diff options
author | stuconnolly <stuart02@gmail.com> | 2011-05-14 17:26:18 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2011-05-14 17:26:18 +0000 |
commit | 2dbae24c7735ead0524bd9847af6ea99d8654ec6 (patch) | |
tree | 87dbed4317214da2aa9e2aed493fd7b798b3e2bc /Source/SPFieldEditorController.m | |
parent | 160728cd29519794b47b3a09b139ce9d604883f0 (diff) | |
download | sequelpro-2dbae24c7735ead0524bd9847af6ea99d8654ec6.tar.gz sequelpro-2dbae24c7735ead0524bd9847af6ea99d8654ec6.tar.bz2 sequelpro-2dbae24c7735ead0524bd9847af6ea99d8654ec6.zip |
Bring outline view branch up to date with trunk (r3279:r3306).
Diffstat (limited to 'Source/SPFieldEditorController.m')
-rw-r--r-- | Source/SPFieldEditorController.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPFieldEditorController.m b/Source/SPFieldEditorController.m index bf48ec80..7bdd2eb9 100644 --- a/Source/SPFieldEditorController.m +++ b/Source/SPFieldEditorController.m @@ -225,10 +225,10 @@ // Init according bit check boxes NSUInteger i = 0; NSUInteger maxBit = (NSUInteger)((maxTextLength > 64) ? 64 : maxTextLength); - if([bitSheetNULLButton state] == NSOffState) + if([bitSheetNULLButton state] == NSOffState && maxBit <= [(NSString*)sheetEditData length]) for( i = 0; i<maxBit; i++ ) [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] - setState:([sheetEditData characterAtIndex:(maxBit-i-1)] == '1') ? NSOnState : NSOffState]; + setState:([(NSString*)sheetEditData characterAtIndex:(maxBit-i-1)] == '1') ? NSOnState : NSOffState]; for( i = maxBit; i<64; i++ ) [[self valueForKeyPath:[NSString stringWithFormat:@"bitSheetBitButton%ld", i]] setEnabled:NO]; |