Skip to content

Commit 2089f48

Browse files
committed
Don't fail if passed multiple newlines as text
Fixes #311
1 parent e65b1e3 commit 2089f48

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

SDL_ttf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3870,6 +3870,8 @@ static SDL_Surface* TTF_Render_Wrapped_Internal(TTF_Font *font, const char *text
38703870
}
38713871
}
38723872
}
3873+
/* In case there are all newlines */
3874+
width = SDL_max(width, 1);
38733875
}
38743876
} else {
38753877
if (numLines <= 1 && font->horizontal_align == TTF_WRAPPED_ALIGN_LEFT) {

0 commit comments

Comments
 (0)