From 762d725f531e44d1c060397d1f72fc1b4f1d74f4 Mon Sep 17 00:00:00 2001 From: girst Date: Mon, 21 Jan 2019 00:11:49 +0100 Subject: [PATCH] fix off-by-one cursor could 'escape' the playfield in KLONDIKE --- sol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sol.c b/sol.c index 24653ac..aa32861 100644 --- a/sol.c +++ b/sol.c @@ -511,7 +511,7 @@ void cursor_right (struct cursor* cursor) { case STOCK: cursor->pile = WASTE; break; case WASTE: cursor->pile = FOUNDATION;cursor->opt = 0; break; case FOUNDATION: - if (cursor->opt < NUM_DECKS*NUM_SUITS) + if (cursor->opt < NUM_SUITS-1) cursor->opt++; } } -- 2.39.3