From 5714da81f83ca1b14c37b9560d916cb0f8f5c916 Mon Sep 17 00:00:00 2001 From: Guldoman Date: Mon, 7 Mar 2022 23:35:56 +0100 Subject: [PATCH] Always check if the beginning of the text needs to be clipped --- src/renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer.c b/src/renderer.c index e756cbb9..c2fa233e 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -289,7 +289,7 @@ float ren_draw_text(RenFont **fonts, const char *text, float x, int y, RenColor break; if (start_x + (glyph_end - glyph_start) >= clip_end_x) glyph_end = glyph_start + (clip_end_x - start_x); - else if (start_x < clip.x) { + if (start_x < clip.x) { int offset = clip.x - start_x; start_x += offset; glyph_start += offset;