Commit 0966a6d5 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed OUTPUT_DEBUG_STRING pointer handling.

parent c2ec3687
......@@ -116,8 +116,14 @@ static void DEBUG_InitCurrProcess(void)
DEBUG_ProcessDeferredDebug();
}
static BOOL DEBUG_ProcessGetString(char* buffer, int size,
HANDLE hp, LPVOID addr)
static BOOL DEBUG_ProcessGetString(char* buffer, int size, HANDLE hp, LPSTR addr)
{
DWORD sz;
*(WCHAR*)buffer = 0;
return (addr && ReadProcessMemory(hp, addr, buffer, size, &sz));
}
static BOOL DEBUG_ProcessGetStringIndirect(char* buffer, int size, HANDLE hp, LPVOID addr)
{
LPVOID ad;
DWORD sz;
......@@ -344,7 +350,7 @@ static DWORD CALLBACK DEBUG_MainLoop(DWORD pid)
break;
case CREATE_PROCESS_DEBUG_EVENT:
DEBUG_ProcessGetString(buffer, sizeof(buffer),
DEBUG_ProcessGetStringIndirect(buffer, sizeof(buffer),
de.u.CreateProcessInfo.hProcess,
de.u.LoadDll.lpImageName);
......@@ -413,7 +419,7 @@ static DWORD CALLBACK DEBUG_MainLoop(DWORD pid)
ERR("Unknown thread\n");
break;
}
DEBUG_ProcessGetString(buffer, sizeof(buffer),
DEBUG_ProcessGetStringIndirect(buffer, sizeof(buffer),
DEBUG_CurrThread->process->handle,
de.u.LoadDll.lpImageName);
......@@ -437,7 +443,6 @@ static DWORD CALLBACK DEBUG_MainLoop(DWORD pid)
DEBUG_CurrThread->process->handle,
de.u.DebugString.lpDebugStringData);
/* fixme unicode de.u.DebugString.fUnicode ? */
TRACE("%08lx:%08lx: output debug string (%s)\n",
de.dwProcessId, de.dwThreadId,
......
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