From c3df61bdc0a4215df260df4347af0c297e2ec13a Mon Sep 17 00:00:00 2001 From: mpv-enjoyer <123133847+mpv-enjoyer@users.noreply.github.com> Date: Mon, 28 Oct 2024 03:21:47 +0300 Subject: [PATCH] Fix empty input string for MeasureTextEx --- src/rtext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtext.c b/src/rtext.c index 3510671be..5665b01fc 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -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;