From 56f9df7e983d07bbcfec0384dc25151b71673bb3 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 15 Aug 2021 12:00:03 -0700 Subject: Workaround Netty bug --- src/main/java/org/traccar/helper/BufferUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/traccar/helper/BufferUtil.java b/src/main/java/org/traccar/helper/BufferUtil.java index 15c619ec5..b086f0f9e 100644 --- a/src/main/java/org/traccar/helper/BufferUtil.java +++ b/src/main/java/org/traccar/helper/BufferUtil.java @@ -41,7 +41,7 @@ public final class BufferUtil { wrappedHaystack.readerIndex(startIndex - haystack.readerIndex()); wrappedHaystack.writerIndex(endIndex - haystack.readerIndex()); int result = indexOf(needle, wrappedHaystack); - return result < 0 ? result : haystack.readerIndex() + result; + return result < 0 ? result : haystack.readerIndex() + startIndex + result; } } -- cgit v1.2.3