From f8d0544edb04745afdd481eaf6424d8601784472 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 31 Aug 2016 18:38:58 +1200 Subject: Fix an issue in Xexun frame decoder --- src/org/traccar/protocol/XexunFrameDecoder.java | 4 ++-- 1 file 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); } -- cgit v1.2.3