aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-11-21 01:03:53 +0000
committerrowanbeentje <rowan@beent.je>2009-11-21 01:03:53 +0000
commit916feeeab23592e38fe1231ffcc3ed2611402725 (patch)
tree309c4e24e9571813af2a15f3c9ebd2473e51dad2
parent72d3441ba97d2dcdadfaac1012cb5c8868897e03 (diff)
downloadsequelpro-916feeeab23592e38fe1231ffcc3ed2611402725.tar.gz
sequelpro-916feeeab23592e38fe1231ffcc3ed2611402725.tar.bz2
sequelpro-916feeeab23592e38fe1231ffcc3ed2611402725.zip
- Fix a nested loop using same same variable, fixing Issue #473
-rw-r--r--Source/CustomQuery.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index 7eb04203..5eb3ddca 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -389,7 +389,7 @@
SEL callbackMethod = NULL;
NSString *taskButtonString;
- int i, totalQueriesRun = 0, totalAffectedRows = 0;
+ int i, j, totalQueriesRun = 0, totalAffectedRows = 0;
double executionTime = 0;
int firstErrorOccuredInQuery = -1;
BOOL suppressErrorSheet = NO;
@@ -467,8 +467,8 @@
theColumns = [streamingResult fetchFieldNames];
if(!tableReloadAfterEditing) {
- for ( i = 0 ; i < [streamingResult numOfFields] ; i++) {
- NSDictionary *columnDefinition = NSArrayObjectAtIndex(cqColumnDefinition,i);
+ for ( j = 0 ; j < [streamingResult numOfFields] ; j++) {
+ NSDictionary *columnDefinition = NSArrayObjectAtIndex(cqColumnDefinition,j);
theCol = [[NSTableColumn alloc] initWithIdentifier:[columnDefinition objectForKey:@"datacolumnindex"]];
[theCol setResizingMask:NSTableColumnUserResizingMask];
[theCol setEditable:YES];
@@ -478,7 +478,7 @@
[dataCell setFont:([prefs boolForKey:SPUseMonospacedFonts]) ? [NSFont fontWithName:SPDefaultMonospacedFontName size:[NSFont smallSystemFontSize]] : [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]];
[dataCell setLineBreakMode:NSLineBreakByTruncatingTail];
[theCol setDataCell:dataCell];
- [[theCol headerCell] setStringValue:NSArrayObjectAtIndex(theColumns, i)];
+ [[theCol headerCell] setStringValue:NSArrayObjectAtIndex(theColumns, j)];
// Set the width of this column to saved value if exists and maps to a real column
if ([columnDefinition objectForKey:@"org_name"] && [[columnDefinition objectForKey:@"org_name"] length]) {