From da00282e3a4003a623e3ecb2bff8dda926ab9217 Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 14 Jan 2014 17:37:30 +0100 Subject: [PATCH] msg: fix printing of module header The code to set root->header was moved before the point where it's used, which broke the logic. --- common/msg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/msg.c b/common/msg.c index 2cd2e19b27..6b5bf4de91 100644 --- a/common/msg.c +++ b/common/msg.c @@ -196,6 +196,7 @@ void mp_msg_va(struct mp_log *log, int lev, const char *format, va_list va) tmp[MSGSIZE_MAX - 2] = '\n'; tmp[MSGSIZE_MAX - 1] = 0; + bool header = root->header; char *terminate = ""; if (lev == MSGL_STATUS) { @@ -214,7 +215,7 @@ void mp_msg_va(struct mp_log *log, int lev, const char *format, va_list va) if (root->color) set_msg_color(stream, lev); - if (root->header) { + if (header) { if ((lev >= MSGL_V && lev != MSGL_SMODE) || root->verbose || root->module) { fprintf(stream, "[%s] ", log->verbose_prefix); } else if (log->prefix) {