Commit: bf4d6cd4d7ace61e9aff996f6ab1f00b6cacfd63
Parent: 5b78f85254bbe6334da9d14d5c01682752cfa111
Author: Randy Palamar
Date: Sun, 25 Aug 2024 00:25:31 -0600
push_cell: just assert cp is non-zero
There should be no reason why a cell would have a 0 for the codepoint.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/vtgl.c b/vtgl.c
@@ -278,10 +278,9 @@ push_cell(RenderPushBuffer *rpb, Term *t, Cell c, Rect r, f32 font_text_dy)
{
u32 idx = get_render_push_buffer_idx(rpb, &t->gl, 2);
+ ASSERT(c.cp);
Glyph g;
- /* TODO: is defaulting to space correct? */
- u32 cp = c.cp? c.cp : ' ';
- i32 depth_idx = get_gpu_glyph_index(t, cp, &g);
+ i32 depth_idx = get_gpu_glyph_index(t, c.cp, &g);
rpb->vertscales[idx + 0] = r.size;
rpb->vertscales[idx + 1] = (v2){.x = g.size.w, .y = g.size.h};