Hi dear list members,
I came across the following code in NSPredicate.m:
( it's in
- (BOOL) _evaluateLeftValue: (id)leftResult
rightValue: (id)rightResult
object: (id)object
line 968ff.)
case NSEndsWithPredicateOperatorType:
{
NSRange range;
range = NSMakeRange([leftResult length] - [rightResult length],
[rightResult length]);
return ([leftResult compare: rightResult
options: compareOptions
range: range] == NSOrderedSame ? YES : NO);
}
IMHO there needs to be a check whether rightResult is longer than
leftResult, as in this case NSMakeRange will throw an exception.
Regards,
Mathias
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep