3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-13 22:50:06 +01:00
- Ensure short is correctly cast to int, as we're using it as if it were unsigned
Dieser Commit ist enthalten in:
dordsor21 2021-09-22 14:32:49 +01:00
Ursprung a241e594c1
Commit 4400b0f83e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B

Datei anzeigen

@ -494,7 +494,7 @@ public final class NBTInputStream implements Closeable {
is.readFully(bytes);
return (bytes);
case NBTConstants.TYPE_STRING:
length = is.readShort();
length = is.readShort() & 0xFFFF;
bytes = new byte[length];
is.readFully(bytes);
return (new String(bytes, NBTConstants.CHARSET));
@ -597,7 +597,7 @@ public final class NBTInputStream implements Closeable {
is.readFully(bytes);
return new ByteArrayTag(bytes);
case NBTConstants.TYPE_STRING:
length = is.readShort();
length = is.readShort() & 0xFFFF;
bytes = new byte[length];
is.readFully(bytes);
return new StringTag(new String(bytes, NBTConstants.CHARSET));