diff options
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/Gt06FrameDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Gt06FrameDecoder.java b/src/org/traccar/protocol/Gt06FrameDecoder.java index bf487dc85..e0bb3b373 100644 --- a/src/org/traccar/protocol/Gt06FrameDecoder.java +++ b/src/org/traccar/protocol/Gt06FrameDecoder.java @@ -36,9 +36,9 @@ public class Gt06FrameDecoder extends FrameDecoder { int length = 2 + 2; // head and tail if (buf.getByte(buf.readerIndex()) == 0x78) { - length += 1 + buf.getByte(buf.readerIndex() + 2); + length += 1 + buf.getUnsignedByte(buf.readerIndex() + 2); } else { - length += 2 + buf.getShort(buf.readerIndex() + 2); + length += 2 + buf.getUnsignedShort(buf.readerIndex() + 2); } // Check length and return buffer |