SortedNotesFolder: Fix binary search

I can't remember why I implemented this myself instead of using a
standard implementation and avoiding idiotic bugs like this.

Fixes #172
This commit is contained in:
Vishesh Handa
2021-08-09 10:43:46 +02:00
parent 4d1dff32fa
commit f24740ea3a

View File

@ -109,7 +109,7 @@ class SortedNotesFolder with NotesFolderNotifier implements NotesFolder {
var r = _sortFunc(_notes[mid], note); var r = _sortFunc(_notes[mid], note);
if (r == 0) { if (r == 0) {
return low; return mid;
} }
if (low == high) { if (low == high) {