Skip to content

Commit

Permalink
Fix server names being truncated ingame.
Browse files Browse the repository at this point in the history
The name length is supposed to be in UTF32 characters, not bytes.
  • Loading branch information
lonemeow committed Feb 14, 2024
1 parent fb59e74 commit 00c8635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client-gui/ServerInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void Write(Stream stream) {
var port = Port;

stream.Write(serverNameBuffer);
stream.WriteByte((byte)serverNameLenBytes);
stream.WriteByte((byte)serverName.Length);
stream.Write(ip);
stream.WriteByte((byte)(port >> 8));
stream.WriteByte((byte)port);
Expand Down

0 comments on commit 00c8635

Please sign in to comment.