mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-25 00:00:26 +08:00
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:
@ -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) {
|
||||||
|
Reference in New Issue
Block a user