Fix misreading of ternary in a8788fb (#724)

This commit is contained in:
Kas-tle 2023-01-07 11:41:02 -08:00 committed by GitHub
parent a8788fb899
commit 7efd7e1d3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,10 +16,10 @@ public class MessageSignature {
int id = helper.readVarInt(in) - 1; int id = helper.readVarInt(in) - 1;
byte[] messageSignature; byte[] messageSignature;
if (id == -1) { if (id == -1) {
messageSignature = null;
} else {
messageSignature = new byte[256]; messageSignature = new byte[256];
in.readBytes(messageSignature); in.readBytes(messageSignature);
} else {
messageSignature = null;
} }
return new MessageSignature(id, messageSignature); return new MessageSignature(id, messageSignature);
} }