aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);
}