111
This commit is contained in:
parent
908226e401
commit
246c4bb2c8
|
|
@ -102,10 +102,9 @@ public class MaplePacketLittleEndianWriter {
|
|||
this.writeAsciiString(s);
|
||||
}
|
||||
|
||||
public final void writeUTF8(final String s) {
|
||||
public final void writeUTF8(String s) {
|
||||
if (s == null ||s.isEmpty()){
|
||||
this.writeShort(0);
|
||||
return;
|
||||
s = "0";
|
||||
}
|
||||
this.writeShort((int) (short)s.getBytes(StandardCharsets.UTF_8).length);
|
||||
this.write(s.getBytes(StandardCharsets.UTF_8));
|
||||
|
|
|
|||
Loading…
Reference in New Issue