Skip to content

Commit

Permalink
Windows: Fixed wrong debugger output if logging empty string as info …
Browse files Browse the repository at this point in the history
…or warning.
  • Loading branch information
philippwiesemann committed Jul 16, 2015
1 parent cad94bd commit 16e1881
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SDL_log.c
Expand Up @@ -371,9 +371,9 @@ 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) {
OutputDebugString(TEXT("Insufficient heap memory to write message\r\n"));
if (GetLastError() == ERROR_NOT_ENOUGH_MEMORY) {
OutputDebugString(TEXT("Insufficient heap memory to write message\r\n"));
}
}
}
#endif /* ifndef __WINRT__ */
Expand Down

0 comments on commit 16e1881

Please sign in to comment.