aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-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]);
}