X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=uci.c;h=dc135b2c74c83b00f0dbbf1711e4aa84a58d9a90;hb=cde66749ec8a0b3c823bbc7aa3818b86821514ec;hp=f78fb2c0473ae50e5a5cd14a72700dc575c87575;hpb=7b1579c574c06f880cc6c01874416dde0374aab6;p=xboard.git diff --git a/uci.c b/uci.c index f78fb2c..dc135b2 100644 --- a/uci.c +++ b/uci.c @@ -36,6 +36,7 @@ void InitEngineUCI( const char * iniDir, ChessProgramState * cps ) char *p, *q; char polyglotCommand[MSG_SIZ]; + if(cps->isUCI == 2) p = appData.ucciAdapter; else p = appData.adapterCommand; q = polyglotCommand; while(*p) { @@ -46,7 +47,7 @@ void InitEngineUCI( const char * iniDir, ChessProgramState * cps ) *s++ = cps == &first ? 'f' : 's'; p++; } - while(*p >= '0' && *p) *s++ = *p++; // copy option name + while(isdigit(*p) || isalpha(*p)) *s++ = *p++; // copy option name *s = NULLCHAR; if(cps == &second) { // change options for first into those for second engine if(strstr(buf, "first") == buf) sprintf(argName, "second%s", buf+5); else