Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

CarlosH

macrumors member
Original poster
So I have this code:

Code:
 len = [(NSInputStream *)stream read:buf maxLength:1024];
            if(len) 
            {
                NSString *tmpStr = [[NSString alloc] initWithBytes:buf length:len encoding:NSUTF8StringEncoding];
}


But len is returning a very big number, like 4294967295, and I am getting a exec_bad_access error when trying to create the string. Anyone have had any issues with this class? This was working before, but I was using iPhone SDK 2.0, but when compiling to 2.2.1, now I get this error, tried to compile for 2.0 again, but the error persist, is like I am still using the 2.2.1 libraries.

Thanks.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.