Commit 6c201262 authored by scoder's avatar scoder

Merge pull request #398 from larsmans/fix-binary-search

fix binary search in code object cache
parents da06b146 65ba5eb3
......@@ -348,7 +348,7 @@ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int co
return count;
}
while (start < end) {
mid = (start + end) / 2;
mid = start + (end - start) / 2;
if (code_line < entries[mid].code_line) {
end = mid;
} else if (code_line > entries[mid].code_line) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment