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:
Simon Tatham
2023-08-13 14:31:50 +01:00
parent a11ee53ef8
commit df31bc7a51

View File

@ -1655,6 +1655,10 @@ static char *interpret_move(const game_state *state, game_ui *ui,
ui->hy = state->sequence[cy];
ui->hshow = true;
ui->hcursor = true;
ui->ohx = cx;
ui->ohy = cy;
ui->odx = ui->ody = 0;
ui->odn = 1;
return MOVE_UI_UPDATE;
}
if (ui->hshow &&