From 6671aa2a08f3efc7cf0380f07e2727228adae282 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 5 Jun 2014 09:49:45 -0700 Subject: [PATCH] Code analysis annotations found a legitimate bug! --- src/test/SDL_test_assert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/SDL_test_assert.c b/src/test/SDL_test_assert.c index 93df3b364c433..691453f0b9eaf 100644 --- a/src/test/SDL_test_assert.c +++ b/src/test/SDL_test_assert.c @@ -46,7 +46,7 @@ static Uint32 SDLTest_AssertsPassed = 0; */ void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *assertDescription, ...) { - va_list list; + va_list list; char logMessage[SDLTEST_MAX_LOGMESSAGE_LENGTH]; /* Print assert description into a buffer */ @@ -56,7 +56,7 @@ void SDLTest_Assert(int assertCondition, SDL_PRINTF_FORMAT_STRING const char *as va_end(list); /* Log, then assert and break on failure */ - SDL_assert((SDLTest_AssertCheck(assertCondition, logMessage))); + SDL_assert((SDLTest_AssertCheck(assertCondition, "%s", logMessage))); } /*