mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-24 09:05:48 -04:00
vt: never call term_print() with a width <= 0
This commit is contained in:
parent
9508804b18
commit
6f2cffd8c0
2 changed files with 3 additions and 3 deletions
|
|
@ -2401,8 +2401,7 @@ print_spacer(struct terminal *term, int col)
|
||||||
void
|
void
|
||||||
term_print(struct terminal *term, wchar_t wc, int width)
|
term_print(struct terminal *term, wchar_t wc, int width)
|
||||||
{
|
{
|
||||||
if (unlikely(width <= 0))
|
assert(width > 0);
|
||||||
return;
|
|
||||||
|
|
||||||
print_linewrap(term);
|
print_linewrap(term);
|
||||||
print_insert(term, width);
|
print_insert(term, width);
|
||||||
|
|
|
||||||
3
vt.c
3
vt.c
|
|
@ -663,7 +663,8 @@ action_utf8_print(struct terminal *term, wchar_t wc)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
term_print(term, wc, width);
|
if (width > 0)
|
||||||
|
term_print(term, wc, width);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue