X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/05f3d08eedc39846a14b06a0c4826351bfd93a4b..a33fdba7f9112f0c005be30e2b92d40db19a3346:/filling.c diff --git a/filling.c b/filling.c index ac5b6d9..82efcca 100644 --- a/filling.c +++ b/filling.c @@ -962,9 +962,13 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, { const int i = w*ui->y + ui->x; char buf[64]; - sprintf(buf, "%d_%d", i, button); ui->x = ui->y = -1; - return dupstr(buf); + if (state->board[i] == button) { + return ""; /* no change - just update ui */ + } else { + sprintf(buf, "%d_%d", i, button); + return dupstr(buf); + } } }