Index: src/OFDataArray.m ================================================================== --- src/OFDataArray.m +++ src/OFDataArray.m @@ -156,11 +156,11 @@ { if (nitems > count) @throw [OFOutOfRangeException newWithClass: isa]; memmove(data + index * itemsize, data + (index + nitems) * itemsize, - nitems * itemsize); + (count - index - nitems) * itemsize); count -= nitems; @try { data = [self resizeMemory: data toNItems: count @@ -322,11 +322,11 @@ if (nitems > count) @throw [OFOutOfRangeException newWithClass: isa]; memmove(data + index * itemsize, data + (index + nitems) * itemsize, - nitems * itemsize); + (count - index - nitems) * itemsize); count -= nitems; nsize = (count * itemsize + lastpagebyte) & ~lastpagebyte; if (size != nsize) Index: src/OFMutableArray.m ================================================================== --- src/OFMutableArray.m +++ src/OFMutableArray.m @@ -48,10 +48,11 @@ for (i = 0; i < count; i++) { if ([objs[i] isEqual: obj]) { [objs[i] release]; [array removeItemAtIndex: i]; + return self; } } return self; }