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

2
csi.c
View file

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