aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/MiniFinderProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/MiniFinderProtocolDecoder.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
index 8bfb4fb36..05994b697 100644
--- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
+++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
@@ -133,7 +133,11 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder {
String sentence = (String) msg;
if (sentence.startsWith("!1,")) {
- getDeviceSession(channel, remoteAddress, sentence.substring(3, sentence.length()));
+ int index = sentence.indexOf(',', 3);
+ if (index < 0) {
+ index = sentence.length();
+ }
+ getDeviceSession(channel, remoteAddress, sentence.substring(3, index));
return null;
}