X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsettings.c;h=643de2ae62f572eef66c7e1f5bd7a8d44381b262;hb=582aeb45129ac85b911614bee1b9cdf8ff0636b5;hp=a5d6ce698923b97a42fcbcb3493e2dc5e952a6af;hpb=e80c98c04e951e5026a24531cd6316be962636b9;p=xboard.git diff --git a/winboard/wsettings.c b/winboard/wsettings.c index a5d6ce6..643de2a 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -323,7 +323,7 @@ GetOptionValues(HWND hDlg, ChessProgramState *cps) success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ - strlen(cps->option[j].name) - 9 ); if(!success) break; changed = strcmp(cps->option[j].textValue, newText) != 0; - safeStrCpy(cps->option[j].textValue, newText, sizeof(cps->option[j].textValue)/sizeof(cps->option[j].textValue[0]) ); + safeStrCpy(cps->option[j].textValue, newText, MSG_SIZ - (cps->option[j].textValue - cps->option[j].name) ); break; case CheckBox: new = IsDlgButtonChecked( hDlg, 2000+2*i );