summaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-10-17 12:03:03 -0400
committerpommicket <pommicket@gmail.com>2023-10-17 12:03:03 -0400
commit7141f05bdc5df4270b0dd68704049eb70bdcc05b (patch)
tree3afa46b86e43104de203f9eb84a922a499cfd238 /text.c
parent6ea5c07b116b98ebc836a10f88cf908d14c9b6c5 (diff)
fix string arguments, nicer config parsing
Diffstat (limited to 'text.c')
-rw-r--r--text.c8
1 files changed, 7 insertions, 1 deletions
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;
}