[libr] Fix incorrect bounds check on array insert

This commit is contained in:
Bill Currie 2020-03-03 00:11:07 +09:00
parent f025bd96d4
commit 679744fc7d

View file

@ -261,7 +261,7 @@
{
local unsigned i;
if (index >= count) // FIXME: need exceptions
if (index > count) // FIXME: need exceptions
[self error: "-insertObject:atIndex: index out of range"];
if (count == capacity) { // at capacity, expand