Fix trailing newline failing tests (#9495)

This commit is contained in:
cawtds 2026-03-13 15:41:01 +01:00 committed by GitHub
parent 75c3f68108
commit 50cfe5847e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -295,7 +295,7 @@ void BreakSubStringAutomatic(u8 *src, u32 maxWidth, u32 screenLines, u8 fontId,
currWordIndex++;
while (currWordIndex < numWords)
{
if (currLineWidth + spaceWidth + allWords[currWordIndex].width > maxWidth)
if (currLineWidth + spaceWidth + allWords[currWordIndex].width + ((toggleScrollPrompt == SHOW_SCROLL_PROMPT) ? SCROLL_PROMPT_WIDTH : 0) > maxWidth)
{
// go to next line
currLineIndex++;