summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-01-14 17:37:30 +0100
committerwm4 <wm4@nowhere>2014-01-14 17:37:30 +0100
commitda00282e3a4003a623e3ecb2bff8dda926ab9217 (patch)
tree6ae5a99f5be91cdac57b7852fae80cf492a0444b /common
parent1cd1fb9e5c39aa858b4f456ce92b506e5f50b768 (diff)
downloadmpv-da00282e3a4003a623e3ecb2bff8dda926ab9217.tar.bz2
mpv-da00282e3a4003a623e3ecb2bff8dda926ab9217.tar.xz
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.
Diffstat (limited to 'common')
-rw-r--r--common/msg.c3
1 files changed, 2 insertions, 1 deletions
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) {