Cap VarInt down to 4 bytes. Early Mojang implementations used 32 BYTES, then they changed it to 5 BYTES. I think they mean 4 BYTES = 32 BITS.
This commit is contained in:
parent
90104b03b7
commit
87f3706736
@ -78,7 +78,7 @@ public abstract class DefinedPacket
|
|||||||
|
|
||||||
out |= ( in & 0x7F ) << ( bytes++ * 7 );
|
out |= ( in & 0x7F ) << ( bytes++ * 7 );
|
||||||
|
|
||||||
if ( bytes > 32 )
|
if ( bytes > 4 )
|
||||||
{
|
{
|
||||||
throw new RuntimeException( "VarInt too big" );
|
throw new RuntimeException( "VarInt too big" );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user