Rob Shearman : comctl32: Fix the character count passed into LoadStringW from propsheet functions.
Alexandre Julliard
julliard at winehq.org
Sat Feb 16 09:57:23 CST 2008
Module: wine
Branch: master
Commit: fd291ed3d89b03a031e807629ed6363a9bed6450
URL: http://source.winehq.org/git/wine.git/?a=commit;h=fd291ed3d89b03a031e807629ed6363a9bed6450
Author: Rob Shearman <rob at codeweavers.com>
Date: Fri Feb 15 10:05:36 2008 +0000
comctl32: Fix the character count passed into LoadStringW from propsheet functions.
---
dlls/comctl32/propsheet.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c
index 82d41cc..f2b704f 100644
--- a/dlls/comctl32/propsheet.c
+++ b/dlls/comctl32/propsheet.c
@@ -555,7 +555,7 @@ static BOOL PROPSHEET_CollectPageInfo(LPCPROPSHEETPAGEW lppsp,
if ( !HIWORD( lppsp->pszTitle ) )
{
- if (!LoadStringW( lppsp->hInstance, (DWORD_PTR)lppsp->pszTitle,szTitle,sizeof(szTitle) ))
+ if (!LoadStringW( lppsp->hInstance, (DWORD_PTR)lppsp->pszTitle,szTitle,sizeof(szTitle)/sizeof(szTitle[0]) ))
{
pTitle = pszNull;
FIXME("Could not load resource #%04x?\n",LOWORD(lppsp->pszTitle));
@@ -2160,7 +2160,7 @@ static void PROPSHEET_SetTitleW(HWND hwndDlg, DWORD dwStyle, LPCWSTR lpszText)
TRACE("%s (style %08x)\n", debugstr_w(lpszText), dwStyle);
if (HIWORD(lpszText) == 0) {
if (!LoadStringW(psInfo->ppshheader.hInstance,
- LOWORD(lpszText), szTitle, sizeof(szTitle)-sizeof(WCHAR)))
+ LOWORD(lpszText), szTitle, sizeof(szTitle)/sizeof(szTitle[0])))
return;
lpszText = szTitle;
}
@@ -3636,7 +3636,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HWND hwndCancel = GetDlgItem(hwnd, IDCANCEL);
EnableWindow(hwndCancel, FALSE);
- if (LoadStringW(COMCTL32_hModule, IDS_CLOSE, buf, sizeof(buf)))
+ if (LoadStringW(COMCTL32_hModule, IDS_CLOSE, buf, sizeof(buf)/sizeof(buf[0])))
SetWindowTextW(hwndOK, buf);
return FALSE;
More information about the wine-cvs
mailing list