mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
Convert most dynamic allocations to use functions from xmalloc.h
This commit is contained in:
parent
ecb2695822
commit
7a77958ba2
21 changed files with 133 additions and 68 deletions
3
vt.c
3
vt.c
|
|
@ -13,6 +13,7 @@
|
|||
#include "grid.h"
|
||||
#include "osc.h"
|
||||
#include "util.h"
|
||||
#include "xmalloc.h"
|
||||
|
||||
#define UNHANDLED() LOG_DBG("unhandled: %s", esc_as_string(term, final))
|
||||
|
||||
|
|
@ -649,7 +650,7 @@ action_utf8_print(struct terminal *term, wchar_t wc)
|
|||
|
||||
if (term->composed_count < CELL_COMB_CHARS_HI) {
|
||||
term->composed_count++;
|
||||
term->composed = realloc(term->composed, term->composed_count * sizeof(term->composed[0]));
|
||||
term->composed = xrealloc(term->composed, term->composed_count * sizeof(term->composed[0]));
|
||||
term->composed[term->composed_count - 1] = new_cc;
|
||||
|
||||
term_print(term, CELL_COMB_CHARS_LO + term->composed_count - 1, base_width);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue