aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRafaelMiquelino <rafaelmiquelino@gmail.com>2021-06-05 14:14:27 -0300
committerRafaelMiquelino <rafaelmiquelino@gmail.com>2021-06-05 14:14:27 -0300
commit1ede0fefed4fb220cd5510b5d75ddd92455f90fa (patch)
treeb6f39144a223040a07e94b2b0f53bf0295c98d1a /src/main
parent9d2df94145fa68c17d1bc13297590a401f1917c9 (diff)
downloadtrackermap-server-1ede0fefed4fb220cd5510b5d75ddd92455f90fa.tar.gz
trackermap-server-1ede0fefed4fb220cd5510b5d75ddd92455f90fa.tar.bz2
trackermap-server-1ede0fefed4fb220cd5510b5d75ddd92455f90fa.zip
Modify Vt200ProtocolDecoder
Change condition to read position to buf.readableBytes() > 2
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/protocol/Vt200ProtocolDecoder.java2
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)));