summaryrefslogtreecommitdiffhomepage
path: root/src/text.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-08-29 13:57:59 +0200
committerraysan5 <[email protected]>2020-08-29 13:57:59 +0200
commit945a02798b2644b61bfd46fda791a563e32f1640 (patch)
tree59543e9815161629e063a681f3cd0104749a60bf /src/text.c
parent9da0656c2f1eed0c74e962edea81168a42640fb4 (diff)
downloadraylib-945a02798b2644b61bfd46fda791a563e32f1640.tar.gz
raylib-945a02798b2644b61bfd46fda791a563e32f1640.zip
DrawTextEx(): Minor tweak
Diffstat (limited to 'src/text.c')
-rw-r--r--src/text.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/text.c b/src/text.c
index e8ee28e8..666e9046 100644
--- a/src/text.c
+++ b/src/text.c
@@ -826,7 +826,7 @@ void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, f
float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor
- for (int i = 0; i < length; i++)
+ for (int i = 0; i < length;)
{
// Get next codepoint from byte string and glyph index in font
int codepointByteCount = 0;
@@ -860,7 +860,7 @@ void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, f
else textOffsetX += ((float)font.chars[index].advanceX*scaleFactor + spacing);
}
- i += (codepointByteCount - 1); // Move text bytes counter to next codepoint
+ i += codepointByteCount; // Move text bytes counter to next codepoint
}
}