mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-10 21:00:36 +01:00
Remove 0 size check
This commit is contained in:
parent
720c986cea
commit
017bbf8a60
@ -106,8 +106,6 @@ public class BinaryReader extends InputStream {
|
|||||||
*/
|
*/
|
||||||
public String readSizedString(int maxLength) {
|
public String readSizedString(int maxLength) {
|
||||||
final int length = readVarInt();
|
final int length = readVarInt();
|
||||||
Check.stateCondition(length <= 0,
|
|
||||||
"Negative string size received");
|
|
||||||
Check.stateCondition(!buffer.isReadable(length),
|
Check.stateCondition(!buffer.isReadable(length),
|
||||||
"Trying to read a string that is too long (wanted {0}, only have {1})",
|
"Trying to read a string that is too long (wanted {0}, only have {1})",
|
||||||
length,
|
length,
|
||||||
|
Loading…
Reference in New Issue
Block a user