diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-24 22:58:06 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-24 22:58:06 +1300 |
commit | fcdea01510dc9bf7144c76f4dd3a08c8c4eebaca (patch) | |
tree | d733534dbf042f26b611269a6649e6b8799376c9 /src | |
parent | 89c6edc4b15b9ebebc9699f4740959753ec56bc6 (diff) | |
download | trackermap-server-fcdea01510dc9bf7144c76f4dd3a08c8c4eebaca.tar.gz trackermap-server-fcdea01510dc9bf7144c76f4dd3a08c8c4eebaca.tar.bz2 trackermap-server-fcdea01510dc9bf7144c76f4dd3a08c8c4eebaca.zip |
Fix Ulbotech event data decoding
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/protocol/UlbotechProtocolDecoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/UlbotechProtocolDecoder.java b/src/org/traccar/protocol/UlbotechProtocolDecoder.java index 5d882ffd8..dd6fb1593 100644 --- a/src/org/traccar/protocol/UlbotechProtocolDecoder.java +++ b/src/org/traccar/protocol/UlbotechProtocolDecoder.java @@ -204,7 +204,9 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder { case DATA_EVENT: position.set(Event.KEY_EVENT, buf.readUnsignedByte()); - position.set("event-mask", buf.readUnsignedInt()); + if (length > 1) { + position.set("event-mask", buf.readUnsignedInt()); + } break; default: |