Accept 's' for shorts

This commit is contained in:
UnfamiliarLegacy 2024-06-24 01:57:38 +02:00
parent de196ef731
commit 3ec372b5d4

View File

@ -59,6 +59,7 @@ public class PacketStringUtils {
if (format != HPacketFormat.EVA_WIRE) { if (format != HPacketFormat.EVA_WIRE) {
packet = replaceWithFormat(format, packet, "\\{u:(-?[0-9]+)}", (temp, value) -> temp.appendShort(Short.parseShort(value))); packet = replaceWithFormat(format, packet, "\\{u:(-?[0-9]+)}", (temp, value) -> temp.appendShort(Short.parseShort(value)));
packet = replaceWithFormat(format, packet, "\\{s:(-?[0-9]+)}", (temp, value) -> temp.appendShort(Short.parseShort(value)));
packet = replaceWithFormat(format, packet, "\\{i:(-?[0-9]+)}", (temp, value) -> temp.appendInt(Integer.parseInt(value))); packet = replaceWithFormat(format, packet, "\\{i:(-?[0-9]+)}", (temp, value) -> temp.appendInt(Integer.parseInt(value)));
packet = replaceWithFormat(format, packet, "\\{b:([Ff]alse|[Tt]rue)}", (temp, value) -> temp.appendBoolean(value.equalsIgnoreCase("true"))); packet = replaceWithFormat(format, packet, "\\{b:([Ff]alse|[Tt]rue)}", (temp, value) -> temp.appendBoolean(value.equalsIgnoreCase("true")));