From 7141f05bdc5df4270b0dd68704049eb70bdcc05b Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 17 Oct 2023 12:03:03 -0400 Subject: fix string arguments, nicer config parsing --- text.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'text.c') diff --git a/text.c b/text.c index b913eb1..825d2ce 100644 --- a/text.c +++ b/text.c @@ -358,7 +358,12 @@ void text_render(Font *font) { } void text_char_with_state(Font *font, TextRenderState *state, char32_t c) { -top:; + bool wrapped = false; +top: + if (wrapped) { + // fuck + return; + } CharInfo info = {0}; if (c >= 0x40000 && c < 0xE0000){ @@ -426,6 +431,7 @@ top:; if (state->wrap && x1 >= max_x) { state->x = min_x; state->y += char_height; + wrapped = true; goto top; } -- cgit v1.2.3