From: H.G.Muller Date: Sat, 20 Sep 2014 07:29:23 +0000 (+0200) Subject: Fix spurious setup command at startup X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=d0e4774e9509e069ef252a071be2bdd497c810dd;p=fairymax.git Fix spurious setup command at startup The vatiable ptc was used uninitialized when the default game description at the start of the ini file was used in response to LoadGame(NULL), leading to printing of a spurious setup command with garbage piece-to-char table, which would wreck the initial setup of XBoard when it started with legality testing off. --- diff --git a/fairymax.c b/fairymax.c index 3ec024f..f20bb1f 100644 --- a/fairymax.c +++ b/fairymax.c @@ -345,6 +345,8 @@ int PrintResult(int s) + + K=I; cnt = D(s,-I,I,Q,O,LL|4*S,3); #ifdef SHATRANJ @@ -468,7 +470,7 @@ void PrintOptions() void LoadGame(char *name) { - int i, j, ptc, count=0; char c, buf[80], pieceToChar[80], parent[80]; + int i, j, ptc=0, count=0; char c, buf[80], pieceToChar[80], parent[80]; static int currentVariant; FILE *f;