aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index 81f5194c8..f7145c86a 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -777,7 +777,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
break;
case 0xF7:
position.set(Position.KEY_BATTERY, buf.readUnsignedInt() * 0.001);
- if (length > 4) {
+ if (length >= 5) {
short batteryStatus = buf.readUnsignedByte();
switch (batteryStatus) {
case 1: