Merge pull request #979 from lutherlau/patch-2

Update garray_sorted_any.go
This commit is contained in:
John Guo
2020-11-12 20:39:17 +08:00
committed by GitHub

View File

@ -446,7 +446,7 @@ func (a *SortedArray) binSearch(value interface{}, lock bool) (index int, result
mid := 0
cmp := -2
for min <= max {
mid = (min + max) / 2
mid = min + int((max-min)/2)
cmp = a.getComparator()(value, a.array[mid])
switch {
case cmp < 0: