When drawing formatted text treat *real* newline characters ('\n') as newlines as well

- Not just the special formatting character '@'

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7346 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2009-05-06 20:24:40 +00:00 committed by Git SVN Gateway
parent 6fdc07b3f9
commit 6739e6aa20
1 changed files with 4 additions and 2 deletions

View File

@ -455,7 +455,8 @@ int iV_DrawFormattedText(const char* String, UDWORD x, UDWORD y, UDWORD Width, U
i = 0;
for (; *curChar != 0
&& *curChar != ASCII_SPACE
&& *curChar != ASCII_NEWLINE;
&& *curChar != ASCII_NEWLINE
&& *curChar != '\n';
++i, ++curChar)
{
if (*curChar == ASCII_COLOURMODE) // If it's a colour mode toggle char then just add it to the word.
@ -494,7 +495,8 @@ int iV_DrawFormattedText(const char* String, UDWORD x, UDWORD y, UDWORD Width, U
}
}
// Check for new line character.
else if (*curChar == ASCII_NEWLINE)
else if (*curChar == ASCII_NEWLINE
|| *curChar == '\n')
{
NewLine = true;
++curChar;