aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-08-28 21:58:03 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-08-28 21:58:03 +1200
commite7d203230ff48e849b0b50a858c73bab8c2dd2e5 (patch)
tree6f106b9265e239e5ef521b8be0fb9f2365485319 /src
parent82a47eee96b4098ebfffa1cea4e1cd7895511564 (diff)
downloadtrackermap-server-e7d203230ff48e849b0b50a858c73bab8c2dd2e5.tar.gz
trackermap-server-e7d203230ff48e849b0b50a858c73bab8c2dd2e5.tar.bz2
trackermap-server-e7d203230ff48e849b0b50a858c73bab8c2dd2e5.zip
Fix GT06 frame decoder
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/Gt06FrameDecoder.java4
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