Windows: Fixed wrong debugger output if logging empty string as info or warning.

This commit is contained in:
Philipp Wiesemann 2015-07-16 21:31:21 +02:00
parent cad94bd502
commit 16e18817e9

View file

@ -371,11 +371,11 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority,
if (consoleAttached == 1) {
if (!WriteConsole(stderrHandle, tstr, lstrlen(tstr), &charsWritten, NULL)) {
OutputDebugString(TEXT("Error calling WriteConsole\r\n"));
}
if (charsWritten == ERROR_NOT_ENOUGH_MEMORY) {
if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
OutputDebugString(TEXT("Insufficient heap memory to write message\r\n"));
}
}
}
#endif /* ifndef __WINRT__ */
SDL_free(tstr);