From cedf6308aab64e0490cfac4213209c51af6a38de Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Thu, 14 Feb 2008 14:38:44 +0000 Subject: [PATCH] hhctrl.ocx: Fix the character count passed to GetFullPathNameW in OpenCHM and NavigateToChm. --- dlls/hhctrl.ocx/chm.c | 2 +- dlls/hhctrl.ocx/help.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index 2a4bfa83b7b..710013e5913 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -342,7 +342,7 @@ CHMInfo *OpenCHM(LPCWSTR szFile) CHMInfo *ret = heap_alloc_zero(sizeof(CHMInfo)); - res = GetFullPathNameW(szFile, sizeof(file), file, NULL); + res = GetFullPathNameW(szFile, sizeof(file)/sizeof(file[0]), file, NULL); ret->szFile = strdupW(file); hres = CoCreateInstance(&CLSID_ITStorage, NULL, CLSCTX_INPROC_SERVER, diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index c49d3cff092..3f6a080ca7c 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -115,7 +115,7 @@ BOOL NavigateToChm(HHInfo *info, LPCWSTR file, LPCWSTR index) if (!info->web_browser) return FALSE; - if(!GetFullPathNameW(file, sizeof(full_path), full_path, NULL)) { + if(!GetFullPathNameW(file, sizeof(full_path)/sizeof(full_path[0]), full_path, NULL)) { WARN("GetFullPathName failed: %u\n", GetLastError()); return FALSE; } -- 2.11.4.GIT