X-Git-Url: https://git.cworth.org/git?p=loa;a=blobdiff_plain;f=loa.c;h=355c66744df9dba359db3b54c2ed2801683b41ce;hp=5716a3627ef1e90e8f91822afd65c60c4c5f6e32;hb=HEAD;hpb=9ec0c1c2741a39d38692ffeb0dfcbc88e874dbdf diff --git a/loa.c b/loa.c index 5716a36..355c667 100644 --- a/loa.c +++ b/loa.c @@ -80,6 +80,13 @@ on_button_press_event (GtkWidget *widget, return TRUE; } + /* Do nothing for out-of-bounds clicks */ + if (x < 0 || x >= LOA_BOARD_SIZE || + y < 0 || y >= LOA_BOARD_SIZE) + { + return TRUE; + } + if (x == game->selected_x && y == game->selected_y) {