JJException icon indicating copy to clipboard operation
JJException copied to clipboard

想问一下为什么这里有个等号?照理说下标要比数量少1的。然后有第三方库奔溃在这,但是这库没开源,麻烦看一下

Open kedu opened this issue 1 year ago • 1 comments

  • (void) hookInsertObject:(id)anObject atIndex:(NSUInteger)index { if (anObject && index <= self.count) { [self hookInsertObject:anObject atIndex:index]; }else{ handleCrashException(JJExceptionGuardArrayContainer,[NSString stringWithFormat:@"NSMutableArray insertObject invalid index:%tu total:%tu insert object:%@",index,self.count,anObject]); } }

kedu avatar Sep 12 '23 01:09 kedu

The index in the array at which to insert anObject. This value must not be greater than the count of elements in the array. 根据官方的解释,index不能大于集合的数量,可以等于的(我已验证), 是不是其他问题?

jezzmemo avatar Oct 14 '23 08:10 jezzmemo