Browse files

avoid empty data

  • Loading branch information...
1 parent 2cd16d2 commit 72e8b9b905714c657a4d8e92373f44478d57e8e2 @psychs psychs committed May 24, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 Classes/IRC/IRCClient.m
View
2 Classes/IRC/IRCClient.m
@@ -3662,7 +3662,7 @@ - (void)ircConnectionDidReceive:(NSData*)data
if (encoding == NSISO2022JPStringEncoding) {
// avoid incomplete sequence
NSMutableData* d = [[data mutableCopy] autorelease];
- while (d.length > 0) {
+ while (d.length > 1) {
[d setLength:d.length - 1];
s = [[[NSString alloc] initWithData:d encoding:enc] autorelease];
if (s) break;

0 comments on commit 72e8b9b

Please sign in to comment.