aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorOliver Schramm <oliver.schramm97@gmail.com>2021-06-24 20:29:00 +0200
committerOliver Schramm <oliver.schramm97@gmail.com>2021-06-24 20:29:00 +0200
commita7aca62f89a69711ff489dbd7753be005e968aec (patch)
tree6f0b953ba3a81250acdb93055d8390e08a50ac76 /src/main/java/org
parentc10c4b985002d9b39213f6a4e33466212705f66d (diff)
downloadtraccar-server-a7aca62f89a69711ff489dbd7753be005e968aec.tar.gz
traccar-server-a7aca62f89a69711ff489dbd7753be005e968aec.tar.bz2
traccar-server-a7aca62f89a69711ff489dbd7753be005e968aec.zip
Clarify code style
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java b/src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java
index 2ce5b9dae..e63dd3b32 100644
--- a/src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java
@@ -141,7 +141,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
beginIndex = endIndex + 2;
endIndex = sentence.indexOf('*', beginIndex) + 3;
- if (beginIndex > endIndex) {
+ if (endIndex < 0) {
return null;
}
location = sentence.substring(beginIndex, endIndex);