mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
render: use actual grid size when re-allocating grid buffer
This commit is contained in:
parent
c853f01027
commit
63e46b7b0b
1 changed files with 2 additions and 2 deletions
4
main.c
4
main.c
|
|
@ -453,10 +453,10 @@ resize(struct context *c, int width, int height)
|
|||
|
||||
c->term.normal.cells = realloc(
|
||||
c->term.normal.cells,
|
||||
c->term.cols * c->term.rows * sizeof(c->term.normal.cells[0]));
|
||||
c->term.normal.size * sizeof(c->term.normal.cells[0]));
|
||||
c->term.alt.cells = realloc(
|
||||
c->term.alt.cells,
|
||||
c->term.cols * c->term.rows * sizeof(c->term.alt.cells[0]));
|
||||
c->term.alt.size * sizeof(c->term.alt.cells[0]));
|
||||
|
||||
for (size_t i = normal_old_size; i < c->term.normal.size; i++) {
|
||||
c->term.normal.cells[i] = (struct cell){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue