From fb39d7ec4a7ab6f693cb2e1b18c4b421356a2129 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sat, 14 Jan 2012 13:53:08 +0100 Subject: [PATCH] Fix engine names with spaces Only the first word in the "id name" command was recognized by scanf. --- UCI2WB.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 -- 1.7.0.4