Fix spurious reading of old game title by JAWS
[xboard.git] / xoptions.c
index b5368a3..759ea19 100644 (file)
@@ -966,6 +966,7 @@ struct NewVarButton buttonDesc[] = {
     {N_("give-away"),         "#FFFFBF", 0, VariantGiveaway},
     {N_("losers"),            "#FFFFBF", 0, VariantLosers},
     {N_("fairy"),             "#BFBFBF", 0, VariantFairy},
+    {N_("Seirawan"),          "#FFBFBF", 0, VariantSChess},
     {N_("Superchess"),        "#FFBFBF", 0, VariantSuper},
     {N_("crazyhouse"),        "#FFBFBF", 0, VariantCrazyhouse},
     {N_("bughouse"),          "#FFBFBF", 0, VariantBughouse},
@@ -981,6 +982,7 @@ struct NewVarButton buttonDesc[] = {
 #ifdef FALCON
     {N_("Falcon (10x8)"),     "#BFBFFF", 0, VariantFalcon},
 #endif
+    {N_("Spartan"),           "#FF0000", 0, VariantSpartan},
     {NULL,                0, 0, (VariantClass) 0}
 };
 
@@ -1432,7 +1434,7 @@ void SettingsCallback(w, client_data, call_data)
                    XtSetArg(args[0], XtNstring, &val);
                    XtGetValues(currentCps->option[i].handle, args, 1);
                    if(strcmp(currentCps->option[i].textValue, val)) {
-                     safeStrCpy(currentCps->option[i].textValue, val, sizeof(currentCps->option[i].textValue)/sizeof(currentCps->option[i].textValue[0]));
+                     safeStrCpy(currentCps->option[i].textValue, val, MSG_SIZ - (currentCps->option[i].textValue - currentCps->option[i].name) );
                      snprintf(buf, MSG_SIZ,  "option %s=%s\n", currentCps->option[i].name, val);
                      SendToProgram(buf, currentCps);
                    }
@@ -1745,6 +1747,7 @@ void SecondSettingsProc(w, event, prms, nprms)
      String *prms;
      Cardinal *nprms;
 {
+   if(WaitForSecond(SettingsMenuIfReady)) return;
    SettingsPopUp(&second);
 }