Commit: 56610f607a15317745697fd264acf2604264054b
Parent: be185571eec96d2c13d18e4fe9c92bf6b74b87b1
Author: Randy Palamar
Date: Thu, 21 Nov 2024 09:23:28 -0700
make sure we don't pass an invalid requested term size
If a negative gets passed in a negative should get passed out
regardless of the cell size + margin size combo.
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/vtgl.c b/vtgl.c
@@ -1074,6 +1074,8 @@ DEBUG_EXPORT VTGL_INITIALIZE_FN(vtgl_initialize)
.x = cs.x * requested_cells.x + 2 * g_term_margin.x,
.y = cs.y * requested_cells.y + 2 * g_term_margin.y,
};
+ if (requested_cells.x < 0 || requested_cells.y)
+ requested_size = (iv2){.x = -1, .y = -1};
t->size = (iv2){.x = 1, .y = 1};
initialize_framebuffer(&t->views[0].fb, t->size);