aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java b/src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java
index 4c2781963..ebfe5f8f3 100644
--- a/src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java
@@ -139,9 +139,8 @@ public class EgtsProtocolDecoder extends BaseProtocolDecoder {
return null;
}
- int frameDataEnd = buf.readerIndex() + frameDataLength;
long objectId = 0L;
- while (buf.readerIndex() < frameDataEnd) {
+ while (buf.readableBytes() > 2) {
int length = buf.readUnsignedShortLE();
int recordIndex = buf.readUnsignedShortLE();