hhctrl.ocx: Fix the character count passed to GetFullPathNameW in OpenCHM and NavigateToChm.

This commit is contained in:
Rob Shearman 2008-02-14 14:38:44 +00:00 committed by Alexandre Julliard
parent 9ca4680fce
commit cedf6308aa
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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;
}