}
static int c2n(char c) { /* XXX cloned from singles.c */
- if (isdigit(c))
+ if (isdigit((unsigned char)c))
return (int)(c - '0');
else if (c >= 'a' && c <= 'z')
return (int)(c - 'a' + 10);
movech = ' ';
else
movech = '.';
- } else
+ } else {
assert(!"unknown action");
+ movech = 0; /* placate optimiser */
+ }
sprintf(buf, "%c%d,%d", movech, gx, gy);