From: H.G. Muller Date: Sat, 14 Jan 2012 12:53:08 +0000 (+0100) Subject: Fix engine names with spaces X-Git-Tag: v2.0~48 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=fb39d7ec4a7ab6f693cb2e1b18c4b421356a2129;p=uci2wb.git Fix engine names with spaces Only the first word in the "id name" command was recognized by scanf. --- diff --git a/UCI2WB.c b/UCI2WB.c index d7350a9..bb6527d 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -227,7 +227,7 @@ Engine2GUI() } else if(!strcmp(command, "id")) { char name[256]; - if(sscanf(line, "id name %s", name) == 1) printf("feature myname=\"%s (U%cI2WB)\"\n", name, sc-32); + if(sscanf(line, "id name %[^\n]", name) == 1) printf("feature myname=\"%s (U%cI2WB)\"\n", name, sc-32); } else if(!strcmp(command, "readyok")) { pause = 0; Sync(WAKEUP); } // resume processing of GUI commands else if(sscanf(command, "u%ciok", &c)==1 && c==sc) printf("feature smp=1 memory=%d done=1\n", hasHash); // done with options