Fix initialization of engine state
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 14 May 2011 08:03:20 +0000 (10:03 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sat, 14 May 2011 08:03:20 +0000 (10:03 +0200)
Some of the initialization relied on variables being zero at startup,
which meant value from the previouly loaded engine hng on after loading
a new one.

backend.c

index d14530f..8916211 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -796,7 +796,11 @@ InitEngine(ChessProgramState *cps, int n)
 
     /* [HGM] debug */
     cps->debug = FALSE;
+
     cps->supportsNPS = UNKNOWN;
+    cps->memSize = FALSE;
+    cps->maxCores = FALSE;
+    cps->egtFormats[0] = NULLCHAR;
 
     /* [HGM] options */
     cps->optionSettings  = appData.engOptions[n];