Skip to content

Commit

Permalink
Fix incorrect undo on failed deal from stock.
Browse files Browse the repository at this point in the history
  • Loading branch information
nielssp committed Apr 3, 2020
1 parent 38aa054 commit b13f867
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/game.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,9 @@ int turn_from_stock(Card *card, Pile *stock, Pile *piles) {
turns++;
card = get_top(stock->stack);
} else {
undo_move();
if (turns > 0) {
undo_move();
}
clear_redo_history();
return 0;
}
Expand Down

0 comments on commit b13f867

Please sign in to comment.