main
...
char coords;
get_coords(1, &coords);
printf("{%s}", coords);
...
get_coords:
void get_coords(int num, char *coords){
if (num == 1){
*coords = '0-0';
}
}
problem seems to happen when the code tries to execute the printf and simply returns errors back… if i remove that line of code or change %s to %c it will work fine…
coordsis acharand not a string.%sconversion specification requires achar *argument and not achar. Passing an object of typecharis undefined behavior.