[Commits] SDL: Windows: Fixed wrong debugger output if logging empty strin...

libsdl.org revision control commits-owner at libsdl.org
Thu Jul 16 12:36:14 PDT 2015


details:   https://hg.libsdl.org/SDL/rev/8a0142df6be5
changeset: 9805:8a0142df6be5
user:      Philipp Wiesemann <philipp.wiesemann at arcor.de>
date:      Thu Jul 16 21:31:21 2015 +0200
description:
Windows: Fixed wrong debugger output if logging empty string as info or warning.

diffstat:

 src/SDL_log.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (16 lines):

diff -r ad692d1e780f -r 8a0142df6be5 src/SDL_log.c
--- a/src/SDL_log.c	Wed Jul 15 21:12:04 2015 +0200
+++ b/src/SDL_log.c	Thu Jul 16 21:31:21 2015 +0200
@@ -371,9 +371,9 @@
         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__ */


More information about the commits mailing list