mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
dcs: put: don't append data if buffer resize failed
This commit is contained in:
parent
a1ce31cd1d
commit
a2652d2447
1 changed files with 2 additions and 1 deletions
3
dcs.c
3
dcs.c
|
|
@ -67,7 +67,8 @@ void
|
|||
dcs_put(struct terminal *term, uint8_t c)
|
||||
{
|
||||
LOG_DBG("PUT: %c", c);
|
||||
ensure_size(term, term->vt.dcs.idx + 1);
|
||||
if (!ensure_size(term, term->vt.dcs.idx + 1))
|
||||
return;
|
||||
term->vt.dcs.data[term->vt.dcs.idx++] = c;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue