diff --git a/JSONKit.m b/JSONKit.m index 520b4be..0e9331f 100644 --- a/JSONKit.m +++ b/JSONKit.m @@ -744,7 +744,9 @@ - (void)getObjects:(id *)objectsPtr range:(NSRange)range NSParameterAssert((objects != NULL) && (count <= capacity)); if((objectsPtr == NULL) && (NSMaxRange(range) > 0UL)) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: pointer to objects array is NULL but range length is %lu", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (unsigned long)NSMaxRange(range)]; } if((range.location > count) || (NSMaxRange(range) > count)) { [NSException raise:NSRangeException format:@"*** -[%@ %@]: index (%lu) beyond bounds (%lu)", NSStringFromClass([self class]), NSStringFromSelector(_cmd), (unsigned long)NSMaxRange(range), (unsigned long)count]; } +#ifndef __clang_analyzer__ memcpy(objectsPtr, objects + range.location, range.length * sizeof(id)); +#endif } - (id)objectAtIndex:(NSUInteger)objectIndex