From c4648ba500864d34a155fff380a43a3dae57a763 Mon Sep 17 00:00:00 2001 From: ademin Date: Sat, 13 Feb 2010 14:17:56 +0000 Subject: [PATCH] src: Fixed stdout and stderr problems. This fixes cmockery defect #13. Signed-off-by: Andreas Schneider --- src/cmockery.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmockery.c b/src/cmockery.c index df78ea2..e658885 100755 --- a/src/cmockery.c +++ b/src/cmockery.c @@ -1533,6 +1533,7 @@ void vprint_message(const char* const format, va_list args) { char buffer[1024]; vsnprintf(buffer, sizeof(buffer), format, args); printf(buffer); + fflush(stdout); #ifdef _WIN32 OutputDebugString(buffer); #endif // _WIN32 @@ -1543,6 +1544,7 @@ void vprint_error(const char* const format, va_list args) { char buffer[1024]; vsnprintf(buffer, sizeof(buffer), format, args); fprintf(stderr, buffer); + fflush(stderr); #ifdef _WIN32 OutputDebugString(buffer); #endif // _WIN32 -- 2.34.1