diff options
| author | Jonas Kölker <jonaskoelker@yahoo.com> | 2015-10-01 14:00:47 +0200 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2015-10-03 16:59:10 +0100 |
| commit | 5cb91f28ba609d04d8948860c34520b66ea16718 (patch) | |
| tree | 9d2177534a84f7327de1fe3517ee790d1507151e /guess.c | |
| parent | ea8da331e361c96a7e563b0a91dc3535e0d1d545 (diff) | |
| download | puzzles-5cb91f28ba609d04d8948860c34520b66ea16718.zip puzzles-5cb91f28ba609d04d8948860c34520b66ea16718.tar.gz puzzles-5cb91f28ba609d04d8948860c34520b66ea16718.tar.bz2 puzzles-5cb91f28ba609d04d8948860c34520b66ea16718.tar.xz | |
Fix a memory error in Guess cursor handling.
Diffstat (limited to 'guess.c')
| -rw-r--r-- | guess.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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 = ""; |