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