Fix ConsolePrintFormat() to corrently wrap '\n'

This commit is contained in:
michaelangel007 2023-04-27 06:18:32 -07:00
parent 69c9726a08
commit 236fd86015

View File

@ -140,7 +140,7 @@ void ConsolePrint ( const char * pText )
while ((y < MAX_PUSH_HEIGHT) && (c = *pSrc))
{
if ((c == '\n') || (x >= (CONSOLE_WIDTH - 1)))
if ((c == '\n') || (x >= g_nConsoleDisplayWidth))
{
*pDst = 0;
x = 0;
@ -158,6 +158,9 @@ void ConsolePrint ( const char * pText )
g_nConsoleBuffer++;
}
pDst = & g_aConsoleBuffer[ g_nConsoleBuffer ][ 0 ];
if (c == '\n')
pSrc++;
}
else
{