Always check if the beginning of the text needs to be clipped

This commit is contained in:
Guldoman 2022-03-07 23:35:56 +01:00
parent 6386bac4e5
commit 5714da81f8
No known key found for this signature in database
GPG Key ID: C08A498EC7F1AFDD
1 changed files with 1 additions and 1 deletions

View File

@ -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;