Code:
- (void) sendMessage:(int) type data:(char[]) data length:(int)length
{
++length;
char message[length];
message[0] = type;
printf("%X",message[0]);
}
So, I pass 0x90 to 'type', and the printf gives me FFFFFF90. If I printf message[1] or [2], I get 7 and FFFFFF84, respectively. They should, of course, be empty.
So, what the hell is going on? I feel I have made some kind of rookie mistake.
