Index: src/list-inl.h |
diff --git a/src/list-inl.h b/src/list-inl.h |
index 94ef14dbaedba2f1ef1f76f02ae2e563880d0219..5a247d5fd766da538c0cc433d3600bb27e9d4abe 100644 |
--- a/src/list-inl.h |
+++ b/src/list-inl.h |
@@ -250,7 +250,7 @@ int SortedListBSearch(const List<T>& list, P cmp) { |
int low = 0; |
int high = list.length() - 1; |
while (low <= high) { |
- int mid = (low + high) / 2; |
+ int mid = low + (high - low) / 2; |
T mid_elem = list[mid]; |
if (cmp(&mid_elem) > 0) { |