Fixes bug in eattr binary search.

This commit is contained in:
Ondrej Zajicek 2009-08-21 09:31:35 +02:00
parent c5be5a163c
commit fee78355b4

View file

@ -74,7 +74,7 @@ ea__find(ea_list *e, unsigned id)
if (e->flags & EALF_BISECT) if (e->flags & EALF_BISECT)
{ {
l = 0; l = 0;
r = e->count + 1; r = e->count - 1;
while (l <= r) while (l <= r)
{ {
m = (l+r) / 2; m = (l+r) / 2;