mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
Pass index of element to util.lower_bound matching function
(imported from commit eb8ba76b4855355bc23d6419cbb0f3a4aad8b6de)
This commit is contained in:
@@ -155,7 +155,7 @@ exports.lower_bound = function (array, arg1, arg2, arg3, arg4) {
|
|||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
step = Math.floor(len / 2);
|
step = Math.floor(len / 2);
|
||||||
middle = first + step;
|
middle = first + step;
|
||||||
if (less(array[middle], value)) {
|
if (less(array[middle], value, middle)) {
|
||||||
first = middle;
|
first = middle;
|
||||||
first++;
|
first++;
|
||||||
len = len - step - 1;
|
len = len - step - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user