mirror of
https://github.com/pret/pokefirered.git
synced 2026-05-09 12:35:23 -05:00
fix newline getting emitted at the end of a string
This commit is contained in:
parent
1e5bbfe3ce
commit
2184cdc32c
|
|
@ -3717,7 +3717,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst, u32 dstSize)
|
|||
while (*toCpy != EOS)
|
||||
{
|
||||
if (*toCpy == CHAR_SPACE)
|
||||
dst[dstID] = CHAR_SPACE; // TODO: NBSP fails tests
|
||||
dst[dstID] = CHAR_NBSP;
|
||||
else
|
||||
dst[dstID] = *toCpy;
|
||||
dstID++;
|
||||
|
|
|
|||
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user