Skip to content

Commit

Permalink
#3574: "VarInt too big" should be an OverflowPacketException
Browse files Browse the repository at this point in the history
  • Loading branch information
Outfluencer authored Dec 16, 2023
1 parent 51b9a6b commit 3deaaad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public static int readVarInt(ByteBuf input, int maxBytes)

if ( bytes > maxBytes )
{
throw new RuntimeException( "VarInt too big" );
throw new OverflowPacketException( "VarInt too big (max " + maxBytes + ")" );
}

if ( ( in & 0x80 ) != 0x80 )
Expand Down

0 comments on commit 3deaaad

Please sign in to comment.