if(!strcasecmp(name, "Threads")) { strcpy(threadOpt, name); continue; }\r
if(!strcasecmp(name, "Ponder") || !strcasecmp(name, "USI_Ponder")) { strcpy(canPonder, name); continue; }\r
if(!strcasecmp(name, "Hash") || !strcasecmp(name, "USI_Hash") || !strcasecmp(name, "hashsize")) {\r
- memory = oldMem = atoi(val); hasHash = 1; \r
+ memory = oldMem = atoi(val); hasHash = max; \r
strcpy(hashOpt, name);\r
continue;\r
}\r
if(!*varList) strcpy(varList, sc=='s' ? ",shogi,5x5+5_shogi" : VARIANTS); // without clue guess liberally\r
printf("feature variants=\"%s\"\n", varList+1); // from UCI_Variant combo and/or UCI_Chess960 check options\r
if(*egts) printf("feature egt=\"%s\"\n", egts+1);\r
- printf("feature smp=1 memory=%d done=1\n", hasHash);\r
+ printf("feature smp=1 memory=%d done=1\n", hasHash > 0);\r
if(unit == 2) { unit = 1; EPRINT((f, "# setoption usemillisec true\n")) }\r
fflush(stdout); return; // done with options\r
}\r
else if(!strcmp(command, "force")) computer = NONE;\r
else if(!strcmp(command, "go")) computer = stm;\r
else if(!strcmp(command, "ping")) { /* static int done; if(!done) pause = 1, fprintf(toE, "isready\n"), fflush(toE), printf("# send isready\n"), fflush(stdout), Sync(PAUSE); done = 1;*/ printf("po%s", line+2); }\r
- else if(!strcmp(command, "memory")) sscanf(line, "memory %d", &memory);\r
+ else if(!strcmp(command, "memory")) { sscanf(line, "memory %d", &memory); if(memory > hasHash) memory = hasHash; }\r
else if(!strcmp(command, "cores")&& !!*threadOpt) { sscanf(line, "cores %d", &cores); EPRINT((f, "# setoption %s%s %s%d\n", nameWord, threadOpt, valueWord, cores)) }\r
else if(!strcmp(command, "egtpath")){\r
sscanf(line+8, "%s %[^\n]", type, command);\r