Skip to content

Commit

Permalink
Check SUPPORTED_PROTOCOLS instead of CURRENT_PROTOCOL in LoginPacket …
Browse files Browse the repository at this point in the history
…decode (CloudburstMC#1431)
  • Loading branch information
PetteriM1 committed May 14, 2020
1 parent f8e9e30 commit a25d4bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cn/nukkit/network/protocol/LoginPacket.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void decode() {
setOffset(getOffset() + 2);
this.protocol = getInt();
}
if (protocol != ProtocolInfo.CURRENT_PROTOCOL) {
if (!ProtocolInfo.SUPPORTED_PROTOCOLS.contains(protocol)) {
// decoding the chain could cause issues on newer or older versions.
return;
}
Expand Down

0 comments on commit a25d4bf

Please sign in to comment.