diff options
author | Matjaž Črnko <m.crnko@txt.si> | 2023-10-01 00:12:02 +0200 |
---|---|---|
committer | Matjaž Črnko <m.crnko@txt.si> | 2023-10-01 00:12:02 +0200 |
commit | 60e9026a968fb639a617670d8b03e052381d5c55 (patch) | |
tree | 9d66ebf32655bec5c561d80f5ff1794fa73dd8ff /src/main/java/org/traccar/protocol | |
parent | 0ad9b4c84b5eb4b9b58f8ca45adff99526ae193e (diff) | |
download | trackermap-server-60e9026a968fb639a617670d8b03e052381d5c55.tar.gz trackermap-server-60e9026a968fb639a617670d8b03e052381d5c55.tar.bz2 trackermap-server-60e9026a968fb639a617670d8b03e052381d5c55.zip |
Ruptela: Fix a bug with extended records spanning multiple messages
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java index b381b93f8..d4f9808ae 100644 --- a/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/RuptelaProtocolDecoder.java @@ -243,7 +243,11 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder { int currentRecord = BitUtil.to(recordExtension, 4); if (currentRecord > 0 && currentRecord <= mergeRecordCount) { - position = positions.remove(positions.size() - 1); + if (positions.size() == 0) { + getLastLocation(position, null); + } else { + position = positions.remove(positions.size() - 1); + } } } |