A user points out that Signpost doesn't in fact use the numeric
[sgt/puzzles] / magnets.c
index c970eee..57bf37a 100644 (file)
--- a/magnets.c
+++ b/magnets.c
@@ -386,7 +386,7 @@ static char n2c(int num) { /* XXX cloned from singles.c */
 }
 
 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);
@@ -1809,8 +1809,10 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds,
             movech = ' ';
         else
             movech = '.';
-    } else
+    } else {
         assert(!"unknown action");
+       movech = 0;                    /* placate optimiser */
+    }
 
     sprintf(buf, "%c%d,%d", movech, gx, gy);