Could someone tell me what is wrong with this?
Code:
static byte response_string[300];
static byte far far_response_string[3500];
_fstrncpy( far_response_string, "hi", 3 );
response_string[0] = far_response_string[1];
goto_lcd(0,1);
sprintf( _temps, "%c", response_string[0] );
puts_lcd( _temps );
What i get on the lcd is nothing (null)
I have a feeling that the
Code:
response_string[0] = far_response_string[1];
line is copying it as a null.
I've tried casting the far_response_string[0] to a (byte) also but with the same problem, the scary thing is that the compiler doesn't complain. I would have expected a suspicious pointer conversion warning if it was a casting issue.