Index: src/list-inl.h |
diff --git a/src/list-inl.h b/src/list-inl.h |
index 80bccc9bc3216cc992897d95993f4eac62e4d95e..5b5179d44c26f331f619762540020c8dd19f171f 100644 |
--- a/src/list-inl.h |
+++ b/src/list-inl.h |
@@ -216,11 +216,11 @@ int SortedListBSearch( |
int mid = (low + high) / 2; |
T mid_elem = list[mid]; |
- if (mid_elem > elem) { |
+ if (cmp(&mid_elem, &elem) > 0) { |
high = mid - 1; |
continue; |
} |
- if (mid_elem < elem) { |
+ if (cmp(&mid_elem, &elem) < 0) { |
low = mid + 1; |
continue; |
} |