mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-27 01:40:16 -05:00
Replace unchecked allocations with calls to xmalloc.h functions
This commit is contained in:
parent
43e27a8843
commit
91b22ae21a
6 changed files with 7 additions and 7 deletions
2
render.c
2
render.c
|
|
@ -1460,7 +1460,7 @@ render_ime_preedit_for_seat(struct terminal *term, struct seat *seat,
|
|||
* from grid), and mark all cells as dirty. This ensures they are
|
||||
* re-rendered when the pre-edit text is modified or removed.
|
||||
*/
|
||||
struct cell *real_cells = malloc(cells_used * sizeof(real_cells[0]));
|
||||
struct cell *real_cells = xmalloc(cells_used * sizeof(real_cells[0]));
|
||||
for (int i = 0; i < cells_used; i++) {
|
||||
xassert(col_idx + i < term->cols);
|
||||
real_cells[i] = row->cells[col_idx + i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue