From de7ab83f5a0f32d0f03867186c13371cb22fd286 Mon Sep 17 00:00:00 2001
From: mpv-enjoyer <123133847+mpv-enjoyer@users.noreply.github.com>
Date: Tue, 29 Oct 2024 08:33:03 +0000
Subject: [PATCH] Fix empty input string for MeasureTextEx (#4448)

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