Skip to content

Commit de096a3

Browse files
committed
that also belongs to the previous commit...
1 parent d8a2b9b commit de096a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Frameworks/SPMySQLFramework/Source/SPMySQLResult.m

+2
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ - (id)_stringWithBytes:(const void *)bytes length:(NSUInteger)length
321321

322322
- (NSString *)_lossyStringWithBytes:(const void *)bytes length:(NSUInteger)length wasLossy:(BOOL *)outLossy
323323
{
324+
if(!bytes || !length) return @""; //to match -[NSString initWithBytes:length:encoding:]
325+
324326
//mysql protocol limits column names to 256 bytes.
325327
//with inline columns and multibyte charsets this can result in a character
326328
//being split in half at which the method above will fail.

0 commit comments

Comments
 (0)