aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-11-29 22:13:45 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-11-29 22:13:45 +1300
commite12632548a71345acc0349ba9db1321cfa628911 (patch)
tree70002354da38b1a3c61ee2ed0918dca3f42c5ae1 /src
parent0adacee61b3ddaacdbac7f47773e9dcbcf5b083c (diff)
downloadtraccar-server-e12632548a71345acc0349ba9db1321cfa628911.tar.gz
traccar-server-e12632548a71345acc0349ba9db1321cfa628911.tar.bz2
traccar-server-e12632548a71345acc0349ba9db1321cfa628911.zip
Fix TMG frame decoder
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/TmgFrameDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/TmgFrameDecoder.java b/src/org/traccar/protocol/TmgFrameDecoder.java
index 07b4162db..549c42466 100644
--- a/src/org/traccar/protocol/TmgFrameDecoder.java
+++ b/src/org/traccar/protocol/TmgFrameDecoder.java
@@ -47,13 +47,13 @@ public class TmgFrameDecoder extends FrameDecoder {
}
});
- if (beginIndex > 0) {
+ if (beginIndex >= 0) {
buf.readerIndex(beginIndex);
int endIndex = buf.indexOf(beginIndex, buf.writerIndex(), (byte) '\n');
- if (endIndex > 0) {
+ if (endIndex >= 0) {
ChannelBuffer frame = buf.readBytes(endIndex - beginIndex);
buf.readByte(); // delimiter
return frame;