diff options
-rw-r--r-- | src/main/java/org/traccar/helper/BufferUtil.java | 2 |
1 files changed, 1 insertions, 1 deletions
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; } } |