Rob Shearman : comdlg32: Fix the character length passed into GetDlgItemTextW in PRINTDLG_PS_UpdateDlgStructW .
Alexandre Julliard
julliard at winehq.org
Tue Feb 19 08:05:15 CST 2008
Module: wine
Branch: master
Commit: 9ad684b42621a6509db0f5e410f412e6f0097e42
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ad684b42621a6509db0f5e410f412e6f0097e42
Author: Rob Shearman <rob at codeweavers.com>
Date: Mon Feb 18 19:39:11 2008 +0000
comdlg32: Fix the character length passed into GetDlgItemTextW in PRINTDLG_PS_UpdateDlgStructW.
---
dlls/comdlg32/printdlg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index 75da027..93b99e9 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -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);
More information about the wine-cvs
mailing list