From fe0b60a7994402ab277eb36a72e82763f733eced Mon Sep 17 00:00:00 2001 From: Simon Barth Date: Fri, 18 Nov 2016 01:05:09 +0100 Subject: [PATCH] Fix putting card stacks into invalid state Bug: When the cursor is on a foundation stack or on the wastepile stack, it is possible to put this stack into an invalid state. Reason: unmark_cards() should only be called on maneuver stacks since it alters the y position of cards. Fix: Only redraw maneuver stacks on ESC-key action. --- src/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keyboard.c b/src/keyboard.c index 8a498c6..92ee0f7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -160,7 +160,7 @@ static void handle_card_movement(struct cursor *cursor) { erase_cursor(cursor); cursor->y--; } - if (marked_cards_count(*origin) > 0) { + if (maneuvre_stack(*origin)) { erase_stack(*origin); unmark_cards(*origin); draw_stack(*origin);