aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/helper/BufferUtil.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-02-04 23:55:53 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2022-02-04 23:56:14 -0800
commit0738af216e7b31926e05d3de64e14e5b7f0b214c (patch)
tree411dbb6f1241ef2051d4bd3ac3817910e2415492 /src/main/java/org/traccar/helper/BufferUtil.java
parent5878ea602d087da291687a0120b5a3f31f7ee861 (diff)
downloadtrackermap-server-0738af216e7b31926e05d3de64e14e5b7f0b214c.tar.gz
trackermap-server-0738af216e7b31926e05d3de64e14e5b7f0b214c.tar.bz2
trackermap-server-0738af216e7b31926e05d3de64e14e5b7f0b214c.zip
Fix buffer search
Diffstat (limited to 'src/main/java/org/traccar/helper/BufferUtil.java')
-rw-r--r--src/main/java/org/traccar/helper/BufferUtil.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/helper/BufferUtil.java b/src/main/java/org/traccar/helper/BufferUtil.java
index bbf12d738..9485c17c6 100644
--- a/src/main/java/org/traccar/helper/BufferUtil.java
+++ b/src/main/java/org/traccar/helper/BufferUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018 - 2021 Anton Tananaev (anton@traccar.org)
+ * Copyright 2018 - 2022 Anton Tananaev (anton@traccar.org)
* Copyright 2018 Andrey Kunitsyn (andrey@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -50,7 +50,7 @@ public final class BufferUtil {
wrappedHaystack.writerIndex(endIndex - haystack.readerIndex());
}
int result = ByteBufUtil.indexOf(needle, wrappedHaystack);
- return result < 0 ? result : haystack.readerIndex() + startIndex + result;
+ return result < 0 ? result : startIndex + result;
}
}