mirror of
https://github.com/tmux/tmux.git
synced 2025-12-17 00:02:23 -05:00
Do not read over buffer if format is a single #, and do not loop forever
if UTF-8 is unfinished in a format. Reported by Giorgi Kobakhia im GitHub issue 4735.
This commit is contained in:
parent
9d6c69ebde
commit
bd16b22dac
@ -1104,8 +1104,6 @@ format_width(const char *expanded)
|
|||||||
more = utf8_append(&ud, *cp);
|
more = utf8_append(&ud, *cp);
|
||||||
if (more == UTF8_DONE)
|
if (more == UTF8_DONE)
|
||||||
width += ud.width;
|
width += ud.width;
|
||||||
else
|
|
||||||
cp -= ud.have;
|
|
||||||
} else if (*cp > 0x1f && *cp < 0x7f) {
|
} else if (*cp > 0x1f && *cp < 0x7f) {
|
||||||
width++;
|
width++;
|
||||||
cp++;
|
cp++;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user