Console: fix max console lines bug

We must check on con_max_lines + 1 since the first line is a dummy.
This commit is contained in:
Kawe Mazidjatari 2024-02-25 20:21:17 +01:00
parent 6cf88dc16c
commit c3b0034478

View File

@ -1109,7 +1109,8 @@ void CConsole::ClearLog(void)
//-----------------------------------------------------------------------------
void CConsole::ClampLogSize(void)
{
const int nMaxLines = con_max_lines.GetInt();
// +1 since the first row is a dummy
const int nMaxLines = con_max_lines.GetInt() + 1;
if (m_Logger.GetTotalLines() > nMaxLines)
{