Skip to content

Commit acd7da6

Browse files
committed
Fix DEBUG_OUTPUT
Signed-off-by: Simon Rozman <simon@rozman.si>
1 parent fef80b5 commit acd7da6

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

MemoryModule.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,12 @@ OutputLastError(const char *msg)
141141
#ifndef DEBUG_OUTPUT
142142
UNREFERENCED_PARAMETER(msg);
143143
#else
144-
LPVOID tmp;
145-
char *tmpmsg;
146-
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
147-
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR)&tmp, 0, NULL);
144+
char *tmp, *tmpmsg;
145+
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
146+
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&tmp, 0, NULL);
148147
tmpmsg = (char *)LocalAlloc(LPTR, strlen(msg) + strlen(tmp) + 3);
149148
sprintf(tmpmsg, "%s: %s", msg, tmp);
150-
OutputDebugString(tmpmsg);
149+
OutputDebugStringA(tmpmsg);
151150
LocalFree(tmpmsg);
152151
LocalFree(tmp);
153152
#endif

0 commit comments

Comments
 (0)