From 1ede0fefed4fb220cd5510b5d75ddd92455f90fa Mon Sep 17 00:00:00 2001 From: RafaelMiquelino Date: Sat, 5 Jun 2021 14:14:27 -0300 Subject: Modify Vt200ProtocolDecoder Change condition to read position to buf.readableBytes() > 2 --- src/main/java/org/traccar/protocol/Vt200ProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/Vt200ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Vt200ProtocolDecoder.java index 22fc2cf18..84ad09caa 100644 --- a/src/main/java/org/traccar/protocol/Vt200ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Vt200ProtocolDecoder.java @@ -82,7 +82,7 @@ public class Vt200ProtocolDecoder extends BaseProtocolDecoder { position.setTime(decodeDate(buf)); - if (buf.readableBytes() >= 9) { + if (buf.readableBytes() > 2) { position.setLatitude(decodeCoordinate(BcdUtil.readInteger(buf, 8))); position.setLongitude(decodeCoordinate(BcdUtil.readInteger(buf, 9))); -- cgit v1.2.3