aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-07-17 08:14:43 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2019-07-17 08:14:43 -0700
commitbba38f9078a1c1455730daf80d76587cf21228cc (patch)
tree88f20b8555ea93c0d2f48065aadbe19f600113d3 /src/main/java/org
parent8e8ad84ca04173a8691ecf2202a8cf4cfbc7bba2 (diff)
downloadtraccar-server-bba38f9078a1c1455730daf80d76587cf21228cc.tar.gz
traccar-server-bba38f9078a1c1455730daf80d76587cf21228cc.tar.bz2
traccar-server-bba38f9078a1c1455730daf80d76587cf21228cc.zip
Fix event decoding
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/GoSafeProtocolDecoder.java4
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]);
}