Support printing of piece command specified in ini file
[fairymax.git] / fairymax.c
index f20bb1f..f476379 100644 (file)
@@ -525,7 +525,6 @@ void LoadGame(char *name)
             c=0; if(i>15 || j>255) break;\r
         }\r
 \r
-        fclose(f);\r
        sh = w[7] < 250 ? 3 : 0;\r
         if(ptc > 1) { // setup board in GUI, by sending it pieceToCharTable and FEN\r
             if(ptc == 2) printf("setup (%s) ", pieceToChar);\r
@@ -538,6 +537,8 @@ void LoadGame(char *name)
             if(makruk) printf("8/");\r
             for(i=0; i<BW; i++) printf("%c", piecename[oo[i]]+'@'); printf(" w KQkq - 0 1\n");\r
         }\r
+       while(fscanf(f, " # %[^\n]", pieceToChar)) printf("piece %s\n", pieceToChar);\r
+        fclose(f);\r
 }\r
 \r
 int main(int argc, char **argv)\r