From 5788206595f0c8d70a8763eb03768ef5552d7e1b Mon Sep 17 00:00:00 2001 From: Anthony Pesch Date: Sat, 17 Jun 2017 22:25:17 -0400 Subject: [PATCH] flush stdout before issuing debugbreak --- src/core/log.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/log.h b/src/core/log.h index a04164dc..dc54295f 100644 --- a/src/core/log.h +++ b/src/core/log.h @@ -1,6 +1,7 @@ #ifndef REDREAM_LOG_H #define REDREAM_LOG_H +#include #include #include "core/option.h" @@ -51,6 +52,7 @@ void log_line(enum log_level level, const char *format, ...); #define LOG_FATAL(...) \ do { \ log_line(LOG_LEVEL_FATAL, ##__VA_ARGS__); \ + fflush(stdout); \ DEBUGBREAK(); \ exit(1); \ } while (0)