Commit cedf6308 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

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

parent 9ca4680f
......@@ -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,
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment