removed install files from master
[xboard.git] / backend.c
index 1d5ca17..b0d9351 100644 (file)
--- 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
+}