aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/XexunProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/XexunProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/XexunProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java
index 32d8eb427..5c719ece7 100644
--- a/src/org/traccar/protocol/XexunProtocolDecoder.java
+++ b/src/org/traccar/protocol/XexunProtocolDecoder.java
@@ -103,8 +103,8 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
Double longitude = Double.parseDouble(parser.group(index++));
longitude += Double.parseDouble(parser.group(index++)) / 60;
String hemisphere = parser.group(index++);
- if (hemisphere != null) {
- if (hemisphere.compareTo("W") == 0) longitude = -longitude;
+ if (hemisphere != null && hemisphere.compareTo("W") == 0) {
+ longitude = -longitude;
}
position.setLongitude(longitude);