From 3ec372b5d44491ed331e07bfe6cfb4d8537f5781 Mon Sep 17 00:00:00 2001 From: UnfamiliarLegacy <74633542+UnfamiliarLegacy@users.noreply.github.com> Date: Mon, 24 Jun 2024 01:57:38 +0200 Subject: [PATCH] Accept 's' for shorts --- .../gearth/services/packet_representation/PacketStringUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/G-Earth/src/main/java/gearth/services/packet_representation/PacketStringUtils.java b/G-Earth/src/main/java/gearth/services/packet_representation/PacketStringUtils.java index c4cb2f0..828eead 100644 --- a/G-Earth/src/main/java/gearth/services/packet_representation/PacketStringUtils.java +++ b/G-Earth/src/main/java/gearth/services/packet_representation/PacketStringUtils.java @@ -59,6 +59,7 @@ public class PacketStringUtils { if (format != HPacketFormat.EVA_WIRE) { 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, "\\{b:([Ff]alse|[Tt]rue)}", (temp, value) -> temp.appendBoolean(value.equalsIgnoreCase("true")));