Reverse loop to make sure no objects is skipped

pull/37/head
Alexandre Cloutier 2014-05-16 15:00:47 -04:00
parent db8d9bb16c
commit b488721f83
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ static NSArray *tasksFields = nil;
component: component]; component: component];
if (quickInfosFlag == YES) if (quickInfosFlag == YES)
{ {
for (i = 0; i < [allInfos count]; i++) { for (i = ([allInfos count] - 1); i >= 0 ; i--) {
if([quickInfosName containsObject:[[allInfos objectAtIndex:i] objectForKey:@"c_name"]]) if([quickInfosName containsObject:[[allInfos objectAtIndex:i] objectForKey:@"c_name"]])
[allInfos removeObjectAtIndex:i]; [allInfos removeObjectAtIndex:i];
} }