Fix leak evaluating a cast

This commit is contained in:
Richard Frith-Macdonald 2021-01-18 11:56:44 +00:00
parent d63b2e0035
commit 925023e8c0

View file

@ -1745,7 +1745,8 @@ GSICUStringMatchesRegex(NSString *string, NSString *regex, NSStringCompareOption
if ([right isEqualToString: @"NSDate"])
{
return [[NSDate alloc] initWithTimeIntervalSinceReferenceDate: [left doubleValue]];
return [NSDate dateWithTimeIntervalSinceReferenceDate:
[left doubleValue]];
}
NSLog(@"Cast to unknown type %@", right);