diff options
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Gt06ProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java index fde34c8f7..018b42dc9 100644 --- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java @@ -197,7 +197,9 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder { position.set(Event.KEY_MNC, buf.readUnsignedByte()); position.set(Event.KEY_LAC, buf.readUnsignedShort()); position.set(Event.KEY_CELL, buf.readUnsignedShort() << 8 + buf.readUnsignedByte()); - buf.skipBytes(lbsLength - 9); + if (lbsLength > 0) { + buf.skipBytes(lbsLength - 9); + } // Status if (type == MSG_GPS_LBS_STATUS_1 || type == MSG_GPS_LBS_STATUS_2 || type == MSG_GPS_LBS_STATUS_3) { |