From 722494af44b3f19aa1b42af223d37844301fe108 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Sat, 21 Oct 2023 21:04:18 -0400 Subject: [PATCH] Console: do not index nonexistent character codes --- src/hulk/console.d | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hulk/console.d b/src/hulk/console.d index b6794f2..7fecb36 100644 --- a/src/hulk/console.d +++ b/src/hulk/console.d @@ -125,6 +125,10 @@ struct Console */ private static void render_char(size_t x, size_t y, char ch) { + if (ch > 127) + { + ch = 0u; + } const(CharInfo) * ci = &Kfont.chars[ch]; Fb.blit_alpha_bitmap(x + ci.left, y + ci.top, ci.bitmap, ci.width, ci.height); }