csi: never call term_print() with width <= 0

This commit is contained in:
Daniel Eklöf 2020-07-16 08:06:37 +02:00
parent 6f2cffd8c0
commit 47d6dd0eee
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

6
csi.c
View file

@ -338,8 +338,10 @@ csi_dispatch(struct terminal *term, uint8_t final)
LOG_DBG("REP: '%C' %d times", term->vt.last_printed, count);
const int width = wcwidth(term->vt.last_printed);
for (int i = 0; i < count; i++)
term_print(term, term->vt.last_printed, width);
if (width > 0) {
for (int i = 0; i < count; i++)
term_print(term, term->vt.last_printed, width);
}
}
break;