mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 00:15:46 -07:00
Fix a memory error in Guess cursor handling.
This commit is contained in:

committed by
Simon Tatham

parent
ea8da331e3
commit
5cb91f28ba
2
guess.c
2
guess.c
@ -777,6 +777,8 @@ static char *interpret_move(const game_state *from, game_ui *ui,
|
||||
set_peg(&from->params, ui, ui->peg_cur, 0);
|
||||
ret = "";
|
||||
} else if (button == 'H' || button == 'h') {
|
||||
if (ui->peg_cur == from->params.npegs)
|
||||
return NULL;
|
||||
ui->display_cur = 1;
|
||||
ui->holds[ui->peg_cur] = 1 - ui->holds[ui->peg_cur];
|
||||
ret = "";
|
||||
|
Reference in New Issue
Block a user