aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/GoSafeProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/GoSafeProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/GoSafeProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
index 8be462ebf..dc9298e71 100644
--- a/src/org/traccar/protocol/GoSafeProtocolDecoder.java
+++ b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
@@ -165,7 +165,10 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
}
String sentence = (String) msg;
- Pattern pattern = sentence.startsWith("*GS02") ? PATTERN_OLD : PATTERN;
+ Pattern pattern = PATTERN;
+ if (sentence.startsWith("*GS02")) {
+ pattern = PATTERN_OLD;
+ }
Parser parser = new Parser(pattern, (String) msg);
if (!parser.matches()) {