mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-05 15:01:46 +01:00
Fixed max string length
This commit is contained in:
parent
8330abbc4b
commit
aa2f8489b2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user