Commit c0fa60f5 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: A few fixes related to Unicode translation.

parent 1690cf18
...@@ -191,13 +191,12 @@ BOOL WINAPI SymGetSearchPathW(HANDLE hProcess, LPWSTR szSearchPath, ...@@ -191,13 +191,12 @@ BOOL WINAPI SymGetSearchPathW(HANDLE hProcess, LPWSTR szSearchPath,
BOOL WINAPI SymGetSearchPath(HANDLE hProcess, LPSTR szSearchPath, BOOL WINAPI SymGetSearchPath(HANDLE hProcess, LPSTR szSearchPath,
DWORD SearchPathLength) DWORD SearchPathLength)
{ {
WCHAR* buffer = HeapAlloc(GetProcessHeap(), 0, SearchPathLength); WCHAR* buffer = HeapAlloc(GetProcessHeap(), 0, SearchPathLength * sizeof(WCHAR));
BOOL ret = FALSE; BOOL ret = FALSE;
if (buffer) if (buffer)
{ {
ret = SymGetSearchPathW(hProcess, buffer, ret = SymGetSearchPathW(hProcess, buffer, SearchPathLength);
SearchPathLength * sizeof(WCHAR));
if (ret) if (ret)
WideCharToMultiByte(CP_ACP, 0, buffer, SearchPathLength, WideCharToMultiByte(CP_ACP, 0, buffer, SearchPathLength,
szSearchPath, SearchPathLength, NULL, NULL); szSearchPath, SearchPathLength, NULL, NULL);
......
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