diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-14 01:55:42 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2023-08-14 01:55:42 +0100 |
| commit | 899c7c41efb2bcc8da8121cc7a8f4fccf5eb9b1e (patch) | |
| tree | 4b58de311f1ca0b3e4035e34d19ac42e8035a508 | |
| parent | 462a5450c6bd7d96a6051b37ceef1fd63426ddf8 (diff) | |
| download | puzzles-899c7c41efb2bcc8da8121cc7a8f4fccf5eb9b1e.zip puzzles-899c7c41efb2bcc8da8121cc7a8f4fccf5eb9b1e.tar.gz puzzles-899c7c41efb2bcc8da8121cc7a8f4fccf5eb9b1e.tar.bz2 puzzles-899c7c41efb2bcc8da8121cc7a8f4fccf5eb9b1e.tar.xz | |
Flood: fix interpret_move() return value for CURSOR_SELECT2
If there's no solution in progress, it should return MOVE_NO_EFFECT,
not MOVE_UNUSED.
| -rw-r--r-- | flood.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -845,9 +845,9 @@ static char *interpret_move(const game_state *state, game_ui *ui, } else if (button == CURSOR_SELECT) { tx = ui->cx; ty = ui->cy; - } else if (button == CURSOR_SELECT2 && - state->soln && state->solnpos < state->soln->nmoves) { - move = state->soln->moves[state->solnpos]; + } else if (button == CURSOR_SELECT2) { + if (state->soln && state->solnpos < state->soln->nmoves) + move = state->soln->moves[state->solnpos]; } else { return MOVE_UNUSED; } |