Skip to content

Commit 2796e59

Browse files
committed
Fix static analyzer warning
1 parent b72fbc8 commit 2796e59

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

FuzzyAutocomplete/FAMatchPattern.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ - (NSString *) twoPassesCandidateForCandidate: (NSString *) candidate {
4949
- (double) scoreTwoPassesCandidate: (NSString *) finalCandidate matchedRanges: (NSArray **) ranges secondPassRanges:(NSArray **)secondPass {
5050
NSUInteger originalLength = finalCandidate.length / 2;
5151

52-
double final = [super scoreCandidate: finalCandidate matchedRanges: ranges];
52+
NSArray * localRanges = nil;
53+
double final = [super scoreCandidate: finalCandidate matchedRanges: &localRanges];
5354

5455
NSMutableArray * secondPassRanges = secondPass ? [NSMutableArray array] : nil;
5556
NSMutableArray * newRanges = ranges ? [NSMutableArray array] : nil;
56-
for (NSValue * v in *ranges) {
57+
for (NSValue * v in localRanges) {
5758
NSRange r = [v rangeValue];
5859
if (r.location > originalLength) {
5960
r.location -= originalLength + 1;

0 commit comments

Comments
 (0)