3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Make sure to check not only the entire array but also how much was written

Dieser Commit ist enthalten in:
Andrew Steinborn 2021-05-04 16:32:37 -04:00
Ursprung 3dc8e25ec7
Commit 7c76ae9a27

Datei anzeigen

@ -83,7 +83,7 @@ public class ProtocolUtilsTest {
writeVarIntOld(varintOld, i); writeVarIntOld(varintOld, i);
ProtocolUtils.writeVarInt(varintNew, i); ProtocolUtils.writeVarInt(varintNew, i);
assertArrayEquals(varintOld.array(), varintNew.array(), assertArrayEquals(ByteBufUtil.getBytes(varintOld), ByteBufUtil.getBytes(varintNew),
"Encoding of " + i + " was invalid"); "Encoding of " + i + " was invalid");
assertEquals(i, oldReadVarIntSafely(varintNew)); assertEquals(i, oldReadVarIntSafely(varintNew));