comdlg32: Fix the character length passed into GetDlgItemTextW in PRINTDLG_PS_UpdateDlgStructW.

This commit is contained in:
Rob Shearman 2008-02-18 19:39:11 +00:00 committed by Alexandre Julliard
parent ff527875d9
commit 9ad684b426
1 changed files with 1 additions and 1 deletions

View File

@ -2560,7 +2560,7 @@ PRINTDLG_PS_UpdateDlgStructW(HWND hDlg, PageSetupDataW *pdw) {
/* Save paper source into device context */
PRINTDLG_SetUpPaperComboBoxW(hDlg,cmb3,devname,portname,dm);
if (GetDlgItemTextW(hDlg,cmb2,papername,sizeof(papername))>0) {
if (GetDlgItemTextW(hDlg,cmb2,papername,sizeof(papername)/sizeof(papername[0]))>0) {
PRINTDLG_PaperSizeW(&(pdw->pdlg),papername,&(pdw->dlgw->ptPaperSize));
pdw->dlgw->ptPaperSize.x = _c_10mm2size((LPPAGESETUPDLGA)pdw->dlgw,pdw->dlgw->ptPaperSize.x);
pdw->dlgw->ptPaperSize.y = _c_10mm2size((LPPAGESETUPDLGA)pdw->dlgw,pdw->dlgw->ptPaperSize.y);