From f80f6bc4a5d51668374b54d65aa3d5f42cea333b Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 23 May 2013 23:27:48 -0700 Subject: [PATCH] Added a newline to OutputDebugString(), fixes output on Visual Studio 2008 --- src/SDL_log.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SDL_log.c b/src/SDL_log.c index fd9545e4c..df6e1e6d4 100644 --- a/src/SDL_log.c +++ b/src/SDL_log.c @@ -299,9 +299,9 @@ SDL_LogOutput(void *userdata, int category, SDL_LogPriority priority, size_t length; LPTSTR tstr; - length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1; + length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1 + 1; output = SDL_stack_alloc(char, length); - SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message); + SDL_snprintf(output, length, "%s: %s\n", SDL_priority_prefixes[priority], message); tstr = WIN_UTF8ToString(output); OutputDebugString(tstr); SDL_free(tstr);