Fixed max string length

This commit is contained in:
themode 2020-11-22 11:16:21 +01:00
parent 8330abbc4b
commit aa2f8489b2

View File

@ -90,7 +90,7 @@ public class BinaryReader extends InputStream {
*/
public String readSizedString(int maxLength) {
final int length = readVarInt();
Check.stateCondition(length >= maxLength,
Check.stateCondition(length > maxLength,
"String length (" + length + ") was higher than the max length of " + maxLength);
final byte[] bytes = readBytes(length);