X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsettings.c;h=ccfae75d28c6aa0b93a4448eb0888f19b5630a6d;hb=231345cae22b7796e67e2a0a6387e6ce22ec7fbd;hp=a5d6ce698923b97a42fcbcb3493e2dc5e952a6af;hpb=e80c98c04e951e5026a24531cd6316be962636b9;p=xboard.git diff --git a/winboard/wsettings.c b/winboard/wsettings.c index a5d6ce6..ccfae75 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 ); @@ -521,8 +521,8 @@ CreateDialogTemplate(int *layoutList, int nr, ChessProgramState *cps) // add butons at the bottom of dialog window y += 13*(nr>>1)+5; - AddControl(x+275, y+18*(buttonRows-1), 25, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDOK-2000); - AddControl(x+235, y+18*(buttonRows-1), 35, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDCANCEL-2000); + AddControl(x+225, y+18*(buttonRows-1), 30, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDOK-2000); + AddControl(x+260, y+18*(buttonRows-1), 40, 15, 0x0080, BS_PUSHBUTTON | WS_VISIBLE | WS_CHILD, IDCANCEL-2000); for(i=0; i