From c3b0034478fa8eff838b3a4951d2b5e0b97c9519 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sun, 25 Feb 2024 20:21:17 +0100 Subject: [PATCH] Console: fix max console lines bug We must check on con_max_lines + 1 since the first line is a dummy. --- r5dev/gameui/IConsole.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/r5dev/gameui/IConsole.cpp b/r5dev/gameui/IConsole.cpp index 8fa6662d..c0cc0e78 100644 --- a/r5dev/gameui/IConsole.cpp +++ b/r5dev/gameui/IConsole.cpp @@ -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) {