So i'm trying to parse some data, it all seemed to be going ok, but i have an odd error.
I'm getting EXC_BAD_ACCESS not really sure why, I'm new to using NSString so..
First code crashes, second doesn't:
// crashes bool nameTime = true; NSString *temp; int i = 0; while([info characterAtIndex:i] != '!') { [temp stringByAppendingString:[NSString stringWithFormat:@"%C", [info characterAtIndex:i]]]; i++; printf("%d\n", i); } // doesnt crash (no bool) NSString *temp; int i = 0; while([info characterAtIndex:i] != '!') { [temp stringByAppendingString:[NSString stringWithFormat:@"%C", [info characterAtIndex:i]]]; i++; printf("%d\n", i); }