From 3e702ed9bf400b0a72534f144b8bec46ee0416cb Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Tue, 11 Jan 2022 11:26:00 +0100
Subject: [PATCH] Fixed bug - 'wraplength == 0' mode wasn't working with
previous change
---
SDL_ttf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/SDL_ttf.c b/SDL_ttf.c
index 5d865a7..a360dea 100644
--- a/SDL_ttf.c
+++ b/SDL_ttf.c
@@ -3410,8 +3410,10 @@ static SDL_Surface* TTF_Render_Wrapped_Internal(TTF_Font *font, const char *text
goto failure;
}
- if (max_count == 0) {
- max_count = 1;
+ if (wrapLength != 0) {
+ if (max_count == 0) {
+ max_count = 1;
+ }
}
while (textlen > 0) {