aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-08-31 18:38:58 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-08-31 18:39:10 +1200
commitf8d0544edb04745afdd481eaf6424d8601784472 (patch)
treeb07e75189ecc022e1afaf63db57d1af82e3adb30 /src/org/traccar/protocol
parenta418adedfc17642dda161dc373b8fc57ab1dbbdf (diff)
downloadtraccar-server-f8d0544edb04745afdd481eaf6424d8601784472.tar.gz
traccar-server-f8d0544edb04745afdd481eaf6424d8601784472.tar.bz2
traccar-server-f8d0544edb04745afdd481eaf6424d8601784472.zip
Fix an issue in Xexun frame decoder
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/XexunFrameDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/XexunFrameDecoder.java b/src/org/traccar/protocol/XexunFrameDecoder.java
index 9b3438aaa..184e2f57b 100644
--- a/src/org/traccar/protocol/XexunFrameDecoder.java
+++ b/src/org/traccar/protocol/XexunFrameDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2012 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@ public class XexunFrameDecoder extends FrameDecoder {
return null;
}
- buf.skipBytes(beginIndex);
+ buf.skipBytes(beginIndex - buf.readerIndex());
return buf.readBytes(endIndex - beginIndex + 1);
}