1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 19:25:12 +01:00

Merge pull request #20415 from ZehMatt/fix-20413

Fix #20413: Crash attempting to navigate an empty console history
This commit is contained in:
Matthias Moninger
2023-06-18 17:14:46 +03:00
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

@@ -13,6 +13,7 @@
- Fix: [#20260] Ride locks up when inspecting/fixing staff member is fired.
- Fix: [#20262] Title screen music missing when “random” title music is selected and RCT1 is no longer linked.
- Fix: [#20361] Crash when using random map generation.
- Fix: [#20413] Crash when attempting to navigate an empty console history.
0.4.5 (2023-05-08)
------------------------------------------------------------------------

View File

@@ -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];