aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-06-14 20:40:54 +0000
committerrowanbeentje <rowan@beent.je>2010-06-14 20:40:54 +0000
commit6e1a24c45eb99a9c9f8e1cb708b64bdc504d5efe (patch)
tree185c75b3f88f1488ccb25a7a614d8ce0b4517f4f /Frameworks/MCPKit
parent7bc4cd410f30b1b8db4485a119fd40db91b9869f (diff)
downloadsequelpro-6e1a24c45eb99a9c9f8e1cb708b64bdc504d5efe.tar.gz
sequelpro-6e1a24c45eb99a9c9f8e1cb708b64bdc504d5efe.tar.bz2
sequelpro-6e1a24c45eb99a9c9f8e1cb708b64bdc504d5efe.zip
- Fix comment retrieval issues for <4.1 when retrieving db structure - addresses crashes http://spbug.com/l/540 and http://spbug.com/l/106
Diffstat (limited to 'Frameworks/MCPKit')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index f36cff2c..efe65e84 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -2191,7 +2191,12 @@ void performThreadedKeepAlive(void *ptr)
NSString *def = [self stringWithCString:row[5] usingEncoding:theConnectionEncoding] ;
NSString *extra = [self stringWithCString:row[6] usingEncoding:theConnectionEncoding] ;
NSString *priv = [self stringWithCString:row[7] usingEncoding:theConnectionEncoding] ;
- NSString *comment = [self stringWithCString:row[8] usingEncoding:theConnectionEncoding] ;
+ NSString *comment;
+ if (sizeof(row) > 8) {
+ comment = [self stringWithCString:row[8] usingEncoding:theConnectionEncoding] ;
+ } else {
+ comment = @"";
+ }
NSArray *a = [coll componentsSeparatedByString:@"_"];
charset = ([a count]) ? [a objectAtIndex:0] : @"";