#3123: Apply exact vanilla string length limits for tab completion

This commit is contained in:
Outfluencer 2021-06-20 00:50:39 +02:00 committed by md_5
parent ad50fc9ad3
commit a8b2f5268d
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -41,7 +41,7 @@ public class TabCompleteRequest extends DefinedPacket
{
transactionId = readVarInt( buf );
}
cursor = readString( buf, 32500 );
cursor = readString( buf, ( protocolVersion > ProtocolConstants.MINECRAFT_1_13 ? 32500 : ( protocolVersion == ProtocolConstants.MINECRAFT_1_13 ? 256 : 32767 ) ) );
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_13 )
{