13
0
geforkt von Mirrors/Velocity

Username can be 16 * 3 bytes (#936)

see my pr #843
Dieser Commit ist enthalten in:
Outfluencer 2023-01-22 00:14:49 +01:00 committet von GitHub
Ursprung 8a048f0505
Commit 50acf17f3f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -143,7 +143,7 @@ public class ServerLogin implements MinecraftPacket {
public int expectedMaxLength(ByteBuf buf, Direction direction, ProtocolVersion version) { public int expectedMaxLength(ByteBuf buf, Direction direction, ProtocolVersion version) {
// Accommodate the rare (but likely malicious) use of UTF-8 usernames, since it is technically // Accommodate the rare (but likely malicious) use of UTF-8 usernames, since it is technically
// legal on the protocol level. // legal on the protocol level.
int base = 1 + (16 * 4); int base = 1 + (16 * 3);
// Adjustments for Key-authentication // Adjustments for Key-authentication
if (version.compareTo(ProtocolVersion.MINECRAFT_1_19) >= 0) { if (version.compareTo(ProtocolVersion.MINECRAFT_1_19) >= 0) {
if (version.compareTo(ProtocolVersion.MINECRAFT_1_19_3) < 0) { if (version.compareTo(ProtocolVersion.MINECRAFT_1_19_3) < 0) {