mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 08:37:59 +00:00
msg: return zero length if bstr_split_utf8 fails
In theory bstr_split_utf8 should skip invalid sequence and move further,
but it doesn't do that currently, so just the string if unsuported code if
found.
Fixes infinite loop on code.len == 0 condition.
Fixes: 5864b72d1a
This commit is contained in:
parent
41259db952
commit
485221ba22
@ -350,7 +350,7 @@ static int term_disp_width(bstr str)
|
||||
|
||||
bstr code = bstr_split_utf8(str, &str);
|
||||
if (code.len == 0)
|
||||
continue;
|
||||
return 0;
|
||||
|
||||
if (code.len == 1 && *code.start == '\n')
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user