mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Group: make keyboard play work again.
It looks as if it's been broken for about nine years, ever since commit 822243de1bc1fc6d introduced the system for drag-selecting a diagonal of squares. The effect of moving the keyboard cursor and then pressing a button was to cause crashes because the ui fields introduced for that system to use (ohx, ohy, odx, ody, odn) were all completely uninitialised.
This commit is contained in:
@ -1655,6 +1655,10 @@ static char *interpret_move(const game_state *state, game_ui *ui,
|
|||||||
ui->hy = state->sequence[cy];
|
ui->hy = state->sequence[cy];
|
||||||
ui->hshow = true;
|
ui->hshow = true;
|
||||||
ui->hcursor = true;
|
ui->hcursor = true;
|
||||||
|
ui->ohx = cx;
|
||||||
|
ui->ohy = cy;
|
||||||
|
ui->odx = ui->ody = 0;
|
||||||
|
ui->odn = 1;
|
||||||
return MOVE_UI_UPDATE;
|
return MOVE_UI_UPDATE;
|
||||||
}
|
}
|
||||||
if (ui->hshow &&
|
if (ui->hshow &&
|
||||||
|
Reference in New Issue
Block a user