Fix in-file EOF problem
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 4 Dec 2010 12:41:31 +0000 (13:41 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sat, 4 Dec 2010 12:41:31 +0000 (13:41 +0100)
Because of use of an uninitialized variable in PrintVariants, some
compiles were thinking that there were no game definitions in the
fmax.ini file.

fairymax.c

index d72a13b..70eac81 100644 (file)
@@ -412,7 +412,7 @@ void CopyBoard(int s)
                                          \r
 void PrintVariants(int combo)\r
 {\r
-        int i, j, count=0, total=0; char c, buf[80];\r
+        int i, j, count=0, total=0; char c=EOF+1, buf[80];\r
         FILE *f;\r
 \r
         f = fopen(INI_FILE, "r");\r