From 3ed8b33deeadcc98185911f41bc6bcb4e53b4719 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sun, 3 Apr 2011 09:34:29 +0000 Subject: Bring outline view branch up to date with trunk (r3246:r3264). --- Source/SPFieldMapperController.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/SPFieldMapperController.m') diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m index de22b485..f6633172 100644 --- a/Source/SPFieldMapperController.m +++ b/Source/SPFieldMapperController.m @@ -1387,7 +1387,7 @@ static NSString *SPTableViewSqlColumnID = @"sql"; // Create a distance matrix for each file-table name // distance will be calculated by using Levenshtein distance minus common prefix and suffix length // and minus the length of a fuzzy regex search for a common sequence of characters - NSUInteger i,j; + NSUInteger i,j,k; NSMutableArray *distMatrix = [NSMutableArray array]; for(i=0; i < [tableHeaderNames count]; i++) { CGFloat dist = 1e6f; @@ -1406,8 +1406,8 @@ static NSString *SPTableViewSqlColumnID = @"sql"; NSMutableString *fuzzyRegexp = [[NSMutableString alloc] initWithCapacity:3]; unichar c; - for(i=0; i<[headerName length]; i++) { - c = [headerName characterAtIndex:i]; + for(k=0; k<[headerName length]; k++) { + c = [headerName characterAtIndex:k]; if (c == '.' || c == '(' || c == ')' || c == '[' || c == ']' || c == '{' || c == '}') [fuzzyRegexp appendFormat:@".*?\\%c",c]; else -- cgit v1.2.3