aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--undead.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/undead.c b/undead.c
index 40339ae..6feca64 100644
--- a/undead.c
+++ b/undead.c
@@ -2083,7 +2083,7 @@ static game_state *execute_move(const game_state *state, const char *move)
} else if (c == 'G' || c == 'V' || c == 'Z' || c == 'E' ||
c == 'g' || c == 'v' || c == 'z') {
move++;
- sscanf(move, "%d%n", &x, &n);
+ if (sscanf(move, "%d%n", &x, &n) != 1) goto badmove;
if (x < 0 || x >= ret->common->num_total) goto badmove;
if (c == 'G') ret->guess[x] = 1;
if (c == 'V') ret->guess[x] = 2;