mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Attempting to begin a drag from (i.e. just click on) the hint pegs
for a past guess caused strangeness up to and including segfault, thanks to bad bounds checking. Well spotted John Sullivan. [originally from svn r6040]
This commit is contained in:
2
guess.c
2
guess.c
@ -637,7 +637,7 @@ static char *interpret_move(game_state *from, game_ui *ui, game_drawstate *ds,
|
||||
} else {
|
||||
over_hint = 1;
|
||||
}
|
||||
} else if (x >= guess_ox &&
|
||||
} else if (x >= guess_ox && x <= (guess_ox + GUESS_W) &&
|
||||
y >= GUESS_OY && y < guess_oy) {
|
||||
over_past_guess_y = (y - GUESS_OY) / PEGOFF;
|
||||
over_past_guess_x = (x - guess_ox) / PEGOFF;
|
||||
|
Reference in New Issue
Block a user