25480af2e21cf136e461ec802177f52b43154485 |
|
15-May-2013 |
Timo Sirainen <tss@iki.fi> |
Added asserts to binary searches to make sure we don't go to infinite loop.
Using idx=left+(right-left)/2 would have worked also to allow 4GB sizes,
but since none of the places in the code are likely to reach 2GB we might as
well just add an assert. (Also if they do reach 2GB, it could be possible
that they could reach also above 4GB and cause problems. Better to see an
early error.) |