diff options
Diffstat (limited to 'Source/MGTemplateEngine.m')
-rw-r--r-- | Source/MGTemplateEngine.m | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/MGTemplateEngine.m b/Source/MGTemplateEngine.m index 17acae65..1cf483f8 100644 --- a/Source/MGTemplateEngine.m +++ b/Source/MGTemplateEngine.m @@ -312,9 +312,9 @@ NSString *digits; BOOL scanned = [scanner scanCharactersFromSet:numbersSet intoString:&digits]; if (scanned && digits && [digits length] > 0) { - NSInteger index = [digits integerValue]; - if (index >= 0 && index < [((NSArray *)currObj) count]) { - newObj = [((NSArray *)currObj) objectAtIndex:index]; + NSInteger indexValue = [digits integerValue]; + if (indexValue >= 0 && indexValue < (NSInteger)[((NSArray *)currObj) count]) { + newObj = [((NSArray *)currObj) objectAtIndex:indexValue]; } } } |