diff options
author | Sergey Kostin <7er@inbox.ru> | 2019-08-06 11:44:56 +0300 |
---|---|---|
committer | Sergey Kostin <7er@inbox.ru> | 2019-08-06 11:44:56 +0300 |
commit | 0eaf9429c99ea1050405860323238254f675c524 (patch) | |
tree | 96bfa26f18e64002d918f51e630a61db6d125dc8 | |
parent | cf6493b331dc59753090e7977d29f8d145b241d2 (diff) | |
download | trackermap-server-0eaf9429c99ea1050405860323238254f675c524.tar.gz trackermap-server-0eaf9429c99ea1050405860323238254f675c524.tar.bz2 trackermap-server-0eaf9429c99ea1050405860323238254f675c524.zip |
code review edits
-rw-r--r-- | src/main/java/org/traccar/protocol/EgtsProtocolDecoder.java | 3 |
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(); |