bugfix in expression parsing - strings

This commit is contained in:
sirjonasxx 2021-04-23 02:51:42 +02:00
parent e60d9165cf
commit 14b4f6e060

View File

@ -124,10 +124,13 @@ public class PacketStringUtils {
}
}
actualString.append(match);
String latin = new String(actualString.toString().getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
HPacket temp = new HPacket(0);
temp.appendString(latin, StandardCharsets.ISO_8859_1);
packet = packet.substring(0, start) +
toString(new HPacket(0, latin).readBytes(latin.length() + 2, 6)) +
toString(temp.readBytes(latin.length() + 2, 6)) +
packet.substring(end + 2);
}
@ -253,6 +256,9 @@ public class PacketStringUtils {
new HPacket("{l}{h:5}{s:\"asdas\"}"),
"s"
));
HPacket p3 = fromString("{l}{h:2266}{s:\"¥\"}{i:0}{i:0}");
System.out.println(p3);
}
}