Need actual byte length for characters

This commit is contained in:
Manevolent
2018-08-05 00:58:21 -04:00
parent e7beee972d
commit 836a952a6d
2 changed files with 4 additions and 2 deletions
@@ -48,6 +48,6 @@ public class PacketBody2Command extends PacketBody {
@Override
public int getSize() {
return text.length();
return text.getBytes(Charset.forName("UTF8")).length;
}
}
@@ -38,6 +38,8 @@ public class ServerConnectionTest {
10000L
);
client.sendServerMessage("\u26D4");
assertEquals(client.getState(), ClientConnectionState.CONNECTED);
for (Client c : client.listClients()) {