From a6b5b7674b0a1dd1d92bbdeaf052715b6b9d9f41 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 12 Nov 2013 18:24:03 +1300 Subject: Fix totem frame decoder (fix #453) --- src/org/traccar/protocol/TotemFrameDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.3