terminal: fix printing of prefix

This was subtly change in 5cfb18. Revert the change.
This commit is contained in:
wm4 2014-04-23 20:37:15 +02:00
parent 8a74638dc7
commit ac1a21e488
1 changed files with 3 additions and 2 deletions

View File

@ -273,12 +273,13 @@ static void print_msg_on_terminal(struct mp_log *log, int lev, char *text)
fprintf(stream, "[%" PRId64 "] ", mp_time_us()); fprintf(stream, "[%" PRId64 "] ", mp_time_us());
if (prefix) { if (prefix) {
if (root->module) if (root->module) {
pretty_print_module(stream, prefix, root->color, lev); pretty_print_module(stream, prefix, root->color, lev);
else if (root->verbose) } else {
fprintf(stream, "[%s] ", prefix); fprintf(stream, "[%s] ", prefix);
} }
} }
}
char *next = strchr(text, '\n'); char *next = strchr(text, '\n');
int len = next ? next - text + 1 : strlen(text); int len = next ? next - text + 1 : strlen(text);