From a7aca62f89a69711ff489dbd7753be005e968aec Mon Sep 17 00:00:00 2001 From: Oliver Schramm Date: Thu, 24 Jun 2021 20:29:00 +0200 Subject: Clarify code style --- src/main/java/org/traccar/protocol/MegastekProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar/protocol') 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); -- cgit v1.2.3