From c0fa60f547875bd67f8344093847bec8e7919953 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 21 Feb 2007 21:56:01 +0100 Subject: [PATCH] dbghelp: A few fixes related to Unicode translation. --- dlls/dbghelp/dbghelp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 31dfae7fcc3..d79e281ab74 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -191,13 +191,12 @@ BOOL WINAPI SymGetSearchPathW(HANDLE hProcess, LPWSTR szSearchPath, BOOL WINAPI SymGetSearchPath(HANDLE hProcess, LPSTR szSearchPath, DWORD SearchPathLength) { - WCHAR* buffer = HeapAlloc(GetProcessHeap(), 0, SearchPathLength); + WCHAR* buffer = HeapAlloc(GetProcessHeap(), 0, SearchPathLength * sizeof(WCHAR)); BOOL ret = FALSE; if (buffer) { - ret = SymGetSearchPathW(hProcess, buffer, - SearchPathLength * sizeof(WCHAR)); + ret = SymGetSearchPathW(hProcess, buffer, SearchPathLength); if (ret) WideCharToMultiByte(CP_ACP, 0, buffer, SearchPathLength, szSearchPath, SearchPathLength, NULL, NULL);