aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/UlbotechProtocolDecoder.java
diff options
context:
space:
mode:
authorRafael Guterres <guterresrafael@gmail.com>2015-11-27 03:45:22 -0200
committerRafael Guterres <guterresrafael@gmail.com>2015-11-27 03:45:22 -0200
commitca06e8d38c0bbd5a68e63ebada8e115da252b055 (patch)
tree39c00c4ceb571cae540d4c25d38ad3d45c72b49c /src/org/traccar/protocol/UlbotechProtocolDecoder.java
parentc57bd2d472467b1b3a45aee1b97c9a0aeef5958a (diff)
parent7db2eb1ad224bf00608ebbcfe13bfa7fd519a7fc (diff)
downloadtrackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.tar.gz
trackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.tar.bz2
trackermap-server-ca06e8d38c0bbd5a68e63ebada8e115da252b055.zip
Merge tananaev/master
Conflicts: src/org/traccar/web/WebServer.java
Diffstat (limited to 'src/org/traccar/protocol/UlbotechProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/UlbotechProtocolDecoder.java4
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: