Fix multi-leg promotions
[xboard.git] / gamelist.c
index a6c688c..34e899a 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * gamelist.c -- Functions to manage a gamelist
  *
- * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+ * Copyright 1995, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free
+ * Software Foundation, Inc.
  *
  * Enhancements Copyright 2005 Alessandro Scotti
  *
@@ -359,6 +360,8 @@ GameListBuild (FILE *f)
         case GameIsDrawn:
         case GameUnfinished:
            if(!currentListGame) break;
+           if(currentListGame->gameInfo.result == GameUnfinished)
+               currentListGame->gameInfo.result = cm; // correct result tag with actual result
            if (currentListGame->gameInfo.resultDetails != NULL) {
                free(currentListGame->gameInfo.resultDetails);
            }