mirror of https://github.com/mpv-player/mpv
msg: print format string on format errors
This commit is contained in:
parent
96006fa97b
commit
4c19df1ded
|
@ -570,7 +570,10 @@ void mp_msg_va(struct mp_log *log, int lev, const char *format, va_list va)
|
||||||
bstr_xappend(root, &root->buffer, log->partial[lev]);
|
bstr_xappend(root, &root->buffer, log->partial[lev]);
|
||||||
log->partial[lev].len = 0;
|
log->partial[lev].len = 0;
|
||||||
|
|
||||||
bstr_xappend_vasprintf(root, &root->buffer, format, va);
|
if (bstr_xappend_vasprintf(root, &root->buffer, format, va) < 0) {
|
||||||
|
bstr_xappend(root, &root->buffer, bstr0("format error: "));
|
||||||
|
bstr_xappend(root, &root->buffer, bstr0(format));
|
||||||
|
}
|
||||||
|
|
||||||
// Remember last status message and restore it to ensure that it is
|
// Remember last status message and restore it to ensure that it is
|
||||||
// always displayed
|
// always displayed
|
||||||
|
|
Loading…
Reference in New Issue