Fix empty input string for MeasureTextEx

This commit is contained in:
mpv-enjoyer 2024-10-28 03:21:47 +03:00 committed by GitHub
parent f59e185d7a
commit c3df61bdc0
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; 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; textSize.y = textHeight;
return textSize; return textSize;