aboutsummaryrefslogtreecommitdiff
path: root/filling.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2023-06-24 18:31:24 +0100
committerBen Harris <bjh21@bjh21.me.uk>2023-06-24 18:31:24 +0100
commitf749a33c5eeb67b19305085feebfe35b0ccaffd0 (patch)
tree2b7cb1a7838b0eb35347880105831478d1798571 /filling.c
parentdd0004fb5ebb581eced0820cd6373f88e98d93e3 (diff)
downloadpuzzles-f749a33c5eeb67b19305085feebfe35b0ccaffd0.zip
puzzles-f749a33c5eeb67b19305085feebfe35b0ccaffd0.tar.gz
puzzles-f749a33c5eeb67b19305085feebfe35b0ccaffd0.tar.bz2
puzzles-f749a33c5eeb67b19305085feebfe35b0ccaffd0.tar.xz
Distinguish MOVE_UNUSED from MOVE_NO_EFFECT in Filling
Diffstat (limited to 'filling.c')
-rw-r--r--filling.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/filling.c b/filling.c
index 9a4aa98..0ab4f08 100644
--- a/filling.c
+++ b/filling.c
@@ -1546,9 +1546,9 @@ static char *interpret_move(const game_state *state, game_ui *ui,
return MOVE_UI_UPDATE;
}
- if (button < '0' || button > '9') return NULL;
+ if (button < '0' || button > '9') return MOVE_UNUSED;
button -= '0';
- if (button > (w == 2 && h == 2 ? 3 : max(w, h))) return NULL;
+ if (button > (w == 2 && h == 2 ? 3 : max(w, h))) return MOVE_UNUSED;
ui->keydragging = false;
for (i = 0; i < w*h; i++) {
@@ -1574,7 +1574,7 @@ static char *interpret_move(const game_state *state, game_ui *ui,
move = srealloc(move, strlen(move)+strlen(buf)+1);
strcat(move, buf);
}
- if (!ui->sel) return move ? move : NULL;
+ if (!ui->sel) return move ? move : MOVE_NO_EFFECT;
sfree(ui->sel);
ui->sel = NULL;
/* Need to update UI at least, as we cleared the selection */