aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gps056FrameDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Gps056FrameDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gps056FrameDecoder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gps056FrameDecoder.java b/src/org/traccar/protocol/Gps056FrameDecoder.java
index 7cfd54c4e..0d84bf231 100644
--- a/src/org/traccar/protocol/Gps056FrameDecoder.java
+++ b/src/org/traccar/protocol/Gps056FrameDecoder.java
@@ -33,7 +33,7 @@ public class Gps056FrameDecoder extends BaseFrameDecoder {
if (buf.readableBytes() >= MESSAGE_HEADER) {
int length = Integer.parseInt(buf.toString(2, 2, StandardCharsets.US_ASCII)) + 5;
if (buf.readableBytes() >= length) {
- ByteBuf frame = buf.readBytes(length);
+ ByteBuf frame = buf.readRetainedSlice(length);
while (buf.isReadable() && buf.getUnsignedByte(buf.readerIndex()) != '$') {
buf.readByte();
}