aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/EelinkProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java
index 11d111e54..2526282b1 100644
--- a/src/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -160,7 +160,9 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
if (statusType == 0x01 || statusType == 0x02 || statusType == 0x03) {
buf.readUnsignedInt(); // device time
- decodeStatus(position, buf.readUnsignedShort());
+ if (buf.readableBytes() >= 2) {
+ decodeStatus(position, buf.readUnsignedShort());
+ }
}
}