aboutsummaryrefslogtreecommitdiff
path: root/unequal.c
diff options
context:
space:
mode:
authorJonas Kölker <jonaskoelker@yahoo.com>2015-09-21 16:41:03 +0200
committerSimon Tatham <anakin@pobox.com>2015-10-03 16:58:11 +0100
commitdc688b1f238fd7c343426b76d120e7ab40aa9668 (patch)
tree53908fa6df85bb9046268103adbc071d6ccc7c5f /unequal.c
parent87b2758b9c5459eae825d0642eb4c057e8c5c6fd (diff)
downloadpuzzles-dc688b1f238fd7c343426b76d120e7ab40aa9668.zip
puzzles-dc688b1f238fd7c343426b76d120e7ab40aa9668.tar.gz
puzzles-dc688b1f238fd7c343426b76d120e7ab40aa9668.tar.bz2
puzzles-dc688b1f238fd7c343426b76d120e7ab40aa9668.tar.xz
Unequal: stop ignoring keys 'h' and 'm' while cursor active.
At least, so long as 'h' and 'm' are not "numbers".
Diffstat (limited to 'unequal.c')
-rw-r--r--unequal.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/unequal.c b/unequal.c
index 3a518d9..54300e1 100644
--- a/unequal.c
+++ b/unequal.c
@@ -1427,18 +1427,15 @@ static char *interpret_move(const game_state *state, game_ui *ui,
return "";
}
-
- if (ui->hshow) {
+ n = c2n(button, state->order);
+ if (ui->hshow && n >= 0 && n <= ds->order) {
debug(("button %d, cbutton %d", button, (int)((char)button)));
- n = c2n(button, state->order);
debug(("n %d, h (%d,%d) p %d flags 0x%x nums %d",
n, ui->hx, ui->hy, ui->hpencil,
GRID(state, flags, ui->hx, ui->hy),
GRID(state, nums, ui->hx, ui->hy)));
- if (n < 0 || n > ds->order)
- return NULL; /* out of range */
if (GRID(state, flags, ui->hx, ui->hy) & F_IMMUTABLE)
return NULL; /* can't edit immutable square (!) */
if (ui->hpencil && GRID(state, nums, ui->hx, ui->hy) > 0)