From 5a1059833fd9e48273b0ad9c165ac2c3e07b9f73 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Wed, 5 Jun 2013 19:22:15 -0400 Subject: [PATCH] Restore the .side and .turn GAME flags after pgn_validate_move(). --- libchess/move.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libchess/move.c b/libchess/move.c index dd0ed03..83dddaa 100644 --- a/libchess/move.c +++ b/libchess/move.c @@ -1457,6 +1457,7 @@ pgn_error_t pgn_parse_move(GAME g, BOARD b, char **mp, char **dst) pgn_error_t pgn_validate_move(GAME g, BOARD b, char **m, char **dst) { int ret; + int side = g->side, turn = g->turn; #ifdef DEBUG PGN_DUMP("%s:%d: BEGIN validate only\n", __FILE__, __LINE__); @@ -1467,6 +1468,8 @@ pgn_error_t pgn_validate_move(GAME g, BOARD b, char **m, char **dst) #ifdef DEBUG PGN_DUMP("%s:%d: END validate only\n", __FILE__, __LINE__); #endif + g->side = side; + g->turn = turn; return ret; } -- 2.11.4.GIT