aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-11-12 18:24:03 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-11-12 18:24:03 +1300
commita6b5b7674b0a1dd1d92bbdeaf052715b6b9d9f41 (patch)
treebc99bf0c242e6b5a53cbaa33def07efa15c434ef /src/org/traccar
parentbbe846c51f189c16a569af8c21b7464087b329ab (diff)
downloadtrackermap-server-a6b5b7674b0a1dd1d92bbdeaf052715b6b9d9f41.tar.gz
trackermap-server-a6b5b7674b0a1dd1d92bbdeaf052715b6b9d9f41.tar.bz2
trackermap-server-a6b5b7674b0a1dd1d92bbdeaf052715b6b9d9f41.zip
Fix totem frame decoder (fix #453)
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/TotemFrameDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/TotemFrameDecoder.java b/src/org/traccar/protocol/TotemFrameDecoder.java
index ad7e160c2..4889fbe0f 100644
--- a/src/org/traccar/protocol/TotemFrameDecoder.java
+++ b/src/org/traccar/protocol/TotemFrameDecoder.java
@@ -41,7 +41,7 @@ public class TotemFrameDecoder extends FrameDecoder {
// Read message
int length = Integer.parseInt(buf.toString(2, 2, Charset.defaultCharset()), 16);
- if (length >= buf.readableBytes()) {
+ if (length <= buf.readableBytes()) {
return buf.readBytes(length);
}