mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-27 05:57:04 +00:00
Fixed range checking for insertObject:atIndex:
This commit is contained in:
@@ -209,7 +209,7 @@ var concat = Array.prototype.concat,
|
||||
|
||||
- (void)insertObject:(id)anObject atIndex:(int)anIndex
|
||||
{
|
||||
if (anIndex >= self.length || anIndex < 0)
|
||||
if (anIndex > self.length || anIndex < 0)
|
||||
_CPRaiseRangeException(self, _cmd, anIndex, self.length);
|
||||
|
||||
splice.call(self, anIndex, 0, anObject);
|
||||
|
||||
Reference in New Issue
Block a user