aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/graphics/text.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graphics/text.c b/src/graphics/text.c
index 89994c5..f635bf6 100644
--- a/src/graphics/text.c
+++ b/src/graphics/text.c
@@ -35,7 +35,7 @@ static void mgl_text_for_each_codepoint(const mgl_text *self, codepoint_loop_cal
float glyph_width = 0.0f;
uint32_t prev_codepoint = 0;
mgl_vec2f glyph_offset = {0, 0};
- unsigned int rows = 0;
+ unsigned int rows = 1;
for(size_t i = 0; i < self->text_size;) {
unsigned char *cp = (unsigned char*)&self->text[i];
@@ -71,9 +71,9 @@ static void mgl_text_for_each_codepoint(const mgl_text *self, codepoint_loop_cal
glyph_offset.y += self->font->character_size;
prev_codepoint = 0;
- ++rows;
if(rows == self->max_rows)
return;
+ ++rows;
} else {
glyph_offset.x += kerning;
}