From c63d08c462ddaff8ee401e97537af53f1f70ad78 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Wed, 22 Oct 2025 15:00:43 +0200 Subject: [PATCH] add @inline to font_load to fix segfault --- lib/ugui.c3l/src/font.c3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ugui.c3l/src/font.c3 b/lib/ugui.c3l/src/font.c3 index 46ef15c..c7c1d56 100644 --- a/lib/ugui.c3l/src/font.c3 +++ b/lib/ugui.c3l/src/font.c3 @@ -105,10 +105,10 @@ fn void? Font.load(&font, Allocator allocator, String name, ZString path, uint h ushort size = (ushort)font.size*(ushort)($$sqrt((float)FONT_CACHED)); font.atlas.new(font.id, ATLAS_GRAYSCALE, size, size)!; -// FIXME: this crashes with O1 or greater, why?? // preallocate the ASCII range for (char c = ' '; c < '~'; c++) { - font.get_glyph((Codepoint)c)!; + // FIXME: without @inline, this crashes with O1 or greater + font.get_glyph((Codepoint)c) @inline!; } }