Add XBoard menu items for arrow highlight and one-click move
[xboard.git] / winboard / wsettings.c
index a5d6ce6..643de2a 100644 (file)
@@ -323,7 +323,7 @@ GetOptionValues(HWND hDlg, ChessProgramState *cps)
                success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ - strlen(cps->option[j].name) - 9 );\r
                if(!success) break;\r
                changed = strcmp(cps->option[j].textValue, newText) != 0;\r
-               safeStrCpy(cps->option[j].textValue, newText, sizeof(cps->option[j].textValue)/sizeof(cps->option[j].textValue[0]) );\r
+               safeStrCpy(cps->option[j].textValue, newText, MSG_SIZ - (cps->option[j].textValue - cps->option[j].name) );\r
                break;\r
            case CheckBox:\r
                new = IsDlgButtonChecked( hDlg, 2000+2*i );\r