Skip to content

Commit

Permalink
Fix empty input string for MeasureTextEx (#4448)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpv-enjoyer authored Oct 29, 2024
1 parent f59e185 commit de7ab83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rtext.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,7 +1327,7 @@ Vector2 MeasureTextEx(Font font, const char *text, float fontSize, float spacing

if (tempTextWidth < textWidth) tempTextWidth = textWidth;

textSize.x = tempTextWidth*scaleFactor + (float)((tempByteCounter - 1)*spacing);
if (size > 0) textSize.x = tempTextWidth*scaleFactor + (float)((tempByteCounter - 1)*spacing);
textSize.y = textHeight;

return textSize;
Expand Down

0 comments on commit de7ab83

Please sign in to comment.