aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/helper
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-08-01 19:06:04 -0700
committerAnton Tananaev <anton@traccar.org>2022-08-01 19:06:04 -0700
commit910965c3d08745d68cbf812ed96eef7323dbb893 (patch)
treed4088e6df1ee46e7e480988746784017edd9c473 /src/main/java/org/traccar/helper
parent2d0d2cd39b40a1b62435efaa193bcf4680f109db (diff)
downloadtrackermap-server-910965c3d08745d68cbf812ed96eef7323dbb893.tar.gz
trackermap-server-910965c3d08745d68cbf812ed96eef7323dbb893.tar.bz2
trackermap-server-910965c3d08745d68cbf812ed96eef7323dbb893.zip
Handle GPS103 no GPS (fix #4915)
Diffstat (limited to 'src/main/java/org/traccar/helper')
-rw-r--r--src/main/java/org/traccar/helper/Parser.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/org/traccar/helper/Parser.java b/src/main/java/org/traccar/helper/Parser.java
index 22e98ded1..aa39e1ad7 100644
--- a/src/main/java/org/traccar/helper/Parser.java
+++ b/src/main/java/org/traccar/helper/Parser.java
@@ -48,13 +48,14 @@ public class Parser {
}
public boolean hasNext(int number) {
- String value = matcher.group(position);
- if (value != null && !value.isEmpty()) {
- return true;
- } else {
- position += number;
- return false;
+ for (int i = position; i < position + number; i++) {
+ String value = matcher.group(i);
+ if (value != null && !value.isEmpty()) {
+ return true;
+ }
}
+ position += number;
+ return false;
}
public String next() {