diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2019-07-17 08:14:43 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2019-07-17 08:14:43 -0700 |
commit | bba38f9078a1c1455730daf80d76587cf21228cc (patch) | |
tree | 88f20b8555ea93c0d2f48065aadbe19f600113d3 /src/main/java/org/traccar | |
parent | 8e8ad84ca04173a8691ecf2202a8cf4cfbc7bba2 (diff) | |
download | trackermap-server-bba38f9078a1c1455730daf80d76587cf21228cc.tar.gz trackermap-server-bba38f9078a1c1455730daf80d76587cf21228cc.tar.bz2 trackermap-server-bba38f9078a1c1455730daf80d76587cf21228cc.zip |
Fix event decoding
Diffstat (limited to 'src/main/java/org/traccar')
-rw-r--r-- | src/main/java/org/traccar/protocol/GoSafeProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/main/java/org/traccar/protocol/GoSafeProtocolDecoder.java index 8164a016d..c4b29850d 100644 --- a/src/main/java/org/traccar/protocol/GoSafeProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/GoSafeProtocolDecoder.java @@ -184,8 +184,8 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder { for (; index < fragments.length; index += 1) { if (!fragments[index].isEmpty()) { - if (Character.isDigit(fragments[index].charAt(0))) { - position.set(Position.KEY_EVENT, Integer.parseInt(fragments[index])); + if (fragments[index].matches("\\p{XDigit}+")) { + position.set(Position.KEY_EVENT, Integer.parseInt(fragments[index], 16)); } else { decodeFragment(position, fragments[index]); } |