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-861f7616d084master
parent
6fdc07b3f9
commit
6739e6aa20
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue