}\r
}\r
\r
- if( NrPieces == 2 || gameInfo.variant != VariantXiangqi &&\r
+ if( NrPieces == 2 || gameInfo.variant != VariantXiangqi && \r
+ gameInfo.variant != VariantShatranj && // [HGM] baring will remain possible\r
(NrPieces == 3 && NrWN+NrBN+NrWB+NrBB == 1 ||\r
NrPieces == NrBB+NrWB+2 && bishopsColor != 3)) // [HGM] all Bishops (Ferz!) same color\r
{ /* KBK, KNK, KK of KBKB with like Bishops */\r
} else return FALSE;\r
*p = 0; // terminate option name\r
// now look if the command-line options define a setting for this engine option.\r
- p = strstr(cps->optionSettings, opt->name);\r
- if(p == cps->optionSettings || p[-1] == ',') {\r
+ if(cps->optionSettings && cps->optionSettings[0])\r
+ p = strstr(cps->optionSettings, opt->name); else p = NULL;\r
+ if(p && (p == cps->optionSettings || p[-1] == ',')) {\r
sprintf(buf, "option %s", p);\r
if(p = strstr(buf, ",")) *p = 0;\r
strcat(buf, "\n");\r