From df31bc7a515a56b2322a097bda8f1aa510a7b9da Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sun, 13 Aug 2023 14:31:50 +0100 Subject: [PATCH] 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. --- unfinished/group.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unfinished/group.c b/unfinished/group.c index c622e9a..943767f 100644 --- a/unfinished/group.c +++ b/unfinished/group.c @@ -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 &&