mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Fix #20413: Crash attempting to navigate an empty console history
This commit is contained in:
@@ -82,7 +82,7 @@ void InGameConsole::Input(ConsoleInput input)
|
||||
_consoleTextInputSession->SelectionStart = _consoleCurrentLine.size();
|
||||
break;
|
||||
case ConsoleInput::HistoryNext:
|
||||
if (_consoleHistoryIndex < _consoleHistory.size() - 1)
|
||||
if (_consoleHistoryIndex + 1 < _consoleHistory.size())
|
||||
{
|
||||
_consoleHistoryIndex++;
|
||||
_consoleCurrentLine = _consoleHistory[_consoleHistoryIndex];
|
||||
|
||||
Reference in New Issue
Block a user