diff options
author | RafaelMiquelino <rafaelmiquelino@gmail.com> | 2021-06-05 14:14:27 -0300 |
---|---|---|
committer | RafaelMiquelino <rafaelmiquelino@gmail.com> | 2021-06-05 14:14:27 -0300 |
commit | 1ede0fefed4fb220cd5510b5d75ddd92455f90fa (patch) | |
tree | b6f39144a223040a07e94b2b0f53bf0295c98d1a /src/main/java/org | |
parent | 9d2df94145fa68c17d1bc13297590a401f1917c9 (diff) | |
download | traccar-server-1ede0fefed4fb220cd5510b5d75ddd92455f90fa.tar.gz traccar-server-1ede0fefed4fb220cd5510b5d75ddd92455f90fa.tar.bz2 traccar-server-1ede0fefed4fb220cd5510b5d75ddd92455f90fa.zip |
Modify Vt200ProtocolDecoder
Change condition to read position to buf.readableBytes() > 2
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/traccar/protocol/Vt200ProtocolDecoder.java | 2 |
1 files changed, 1 insertions, 1 deletions
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))); |