Fix empty input string for MeasureTextEx (#4448)

This commit is contained in:
mpv-enjoyer 2024-10-29 08:33:03 +00:00 committed by GitHub
parent f59e185d7a
commit de7ab83f5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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