Index: src/OFMutableArray.m ================================================================== --- src/OFMutableArray.m +++ src/OFMutableArray.m @@ -156,11 +156,11 @@ atIndex: (size_t)index { OFObject **objs = [array cArray]; size_t i, count = [array count]; - if (nobjects > count) + if (nobjects > count - index) @throw [OFOutOfRangeException newWithClass: isa]; for (i = index; i < count && i < index + nobjects; i++) [objs[i] release];