aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-03-22 00:23:21 +0000
committerrowanbeentje <rowan@beent.je>2011-03-22 00:23:21 +0000
commitbbbed0dc478ab123100e9a6cdc17211c67afdc71 (patch)
tree5984cd79c7b7da902dc2abc8daad65de9dca8fc5
parent0912522da735e423d5d99390ca30e358f18993b8 (diff)
downloadsequelpro-bbbed0dc478ab123100e9a6cdc17211c67afdc71.tar.gz
sequelpro-bbbed0dc478ab123100e9a6cdc17211c67afdc71.tar.bz2
sequelpro-bbbed0dc478ab123100e9a6cdc17211c67afdc71.zip
- Fix exceptions importing CSVs, caused by incorrect warnings cleanup in r3240
-rw-r--r--Source/SPFieldMapperController.m6
1 files changed, 3 insertions, 3 deletions
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