X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=b0d93515caf8913277c9d116f5ac731a3e4ee34c;hb=2981982916736a59e84ac7cc8abc241193c9ecf2;hp=1d5ca17baf8e68b945ce15b0d62e84b2671f8b46;hpb=c560bfa01c217889fde6b3b5cb8692356680178d;p=xboard.git diff --git a/backend.c b/backend.c index 1d5ca17..b0d9351 100644 --- a/backend.c +++ b/backend.c @@ -2110,9 +2110,10 @@ read_from_ics(isr, closure, data, count, error) if (data[i] != NULLCHAR && data[i] != '\r') buf[buf_len++] = data[i]; if(buf_len >= 5 && buf[buf_len-5]=='\n' && buf[buf_len-4]=='\\' && - buf[buf_len-3]==' ' && buf[buf_len-2]==' ' && buf[buf_len-1]==' ') + buf[buf_len-3]==' ' && buf[buf_len-2]==' ' && buf[buf_len-1]==' ') { buf_len -= 5; // [HGM] ICS: join continuation line of Lasker 2.2.3 server with previous buf[buf_len++] = ' '; // replace by space (assumes ICS does not break lines within word) + } } buf[buf_len] = NULLCHAR; @@ -12548,7 +12549,11 @@ ParseFeatures(args, cps) if (BoolFeature(&p, "smp", &cps->maxCores, cps)) continue; if (StringFeature(&p, "egt", &cps->egtFormats, cps)) continue; if (StringFeature(&p, "option", &(cps->option[cps->nrOptions].name), cps)) { - ParseOption(&(cps->option[cps->nrOptions++]), cps); // [HGM] options: add option feature + if(!ParseOption(&(cps->option[cps->nrOptions++]), cps)) { // [HGM] options: add option feature + sprintf(buf, "rejected option %s\n", cps->option[--cps->nrOptions].name); + SendToProgram(buf, cps); + continue; + } if(cps->nrOptions >= MAX_OPTIONS) { cps->nrOptions--; sprintf(buf, "%s engine has too many options\n", cps->which); @@ -13822,4 +13827,4 @@ EditPositionPasteFEN(char *fen) DrawPosition(FALSE, boards[currentMove]); } } -} \ No newline at end of file +}