From 63318c9e0e9346d96a3b4276624f29d1a3c5f912 Mon Sep 17 00:00:00 2001
From: SimonMaracine <[EMAIL REDACTED]>
Date: Sun, 29 Jun 2025 12:00:52 +0300
Subject: [PATCH] Return the errors from GetWrappedLines in LayoutText instead
of ignoring them
(cherry picked from commit 40ef7580eef17436ad3263e0d8e5ba19c73abf8e)
---
src/SDL_ttf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/SDL_ttf.c b/src/SDL_ttf.c
index dc885700..08f33465 100644
--- a/src/SDL_ttf.c
+++ b/src/SDL_ttf.c
@@ -4516,7 +4516,7 @@ static bool LayoutText(TTF_Text *text)
Uint32 script = TTF_GetTextScript(text);
if (!GetWrappedLines(font, text->text, length, direction, script, text->internal->x, wrap_width, trim_whitespace, &strLines, &numLines, &width, &height, false)) {
- return true;
+ return false;
}
height += text->internal->y;