aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/NavigilFrameDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/NavigilFrameDecoder.java')
-rw-r--r--src/org/traccar/protocol/NavigilFrameDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/NavigilFrameDecoder.java b/src/org/traccar/protocol/NavigilFrameDecoder.java
index f806e138f..48328b2e5 100644
--- a/src/org/traccar/protocol/NavigilFrameDecoder.java
+++ b/src/org/traccar/protocol/NavigilFrameDecoder.java
@@ -47,8 +47,9 @@ public class NavigilFrameDecoder extends FrameDecoder {
if (buf.readableBytes() >= length) {
if (hasPreamble) {
buf.readUnsignedInt();
+ length -= 4;
}
- return buf.readBytes(length - 4);
+ return buf.readBytes(length);
}
return null;