From: jacob Date: Fri, 16 Mar 2007 13:32:43 +0000 (+0000) Subject: Disallow clicks between squares. X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/commitdiff_plain/84f7de6dbd7fbaddd18f8572d14b69b84de0023d Disallow clicks between squares. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@7400 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unequal.c b/unequal.c index 91ae118..acc33d7 100644 --- a/unequal.c +++ b/unequal.c @@ -1266,7 +1266,8 @@ static char *interpret_move(game_state *state, game_ui *ui, game_drawstate *ds, button &= ~MOD_MASK; - if (x >= 0 && x < ds->order && y >= 0 && y < ds->order) { + if (x >= 0 && x < ds->order && ((ox - COORD(x)) <= TILE_SIZE) && + y >= 0 && y < ds->order && ((oy - COORD(y)) <= TILE_SIZE)) { if (button == LEFT_BUTTON) { /* normal highlighting for non-immutable squares */ if (GRID(state, flags, x, y) & F_IMMUTABLE)