mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #20415 from ZehMatt/fix-20413
Fix #20413: Crash attempting to navigate an empty console history
This commit is contained in:
commit
e67fce7e4a
|
@ -13,6 +13,7 @@
|
||||||
- Fix: [#20260] Ride locks up when inspecting/fixing staff member is fired.
|
- 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: [#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: [#20361] Crash when using random map generation.
|
||||||
|
- Fix: [#20413] Crash when attempting to navigate an empty console history.
|
||||||
|
|
||||||
0.4.5 (2023-05-08)
|
0.4.5 (2023-05-08)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
|
@ -82,7 +82,7 @@ void InGameConsole::Input(ConsoleInput input)
|
||||||
_consoleTextInputSession->SelectionStart = _consoleCurrentLine.size();
|
_consoleTextInputSession->SelectionStart = _consoleCurrentLine.size();
|
||||||
break;
|
break;
|
||||||
case ConsoleInput::HistoryNext:
|
case ConsoleInput::HistoryNext:
|
||||||
if (_consoleHistoryIndex < _consoleHistory.size() - 1)
|
if (_consoleHistoryIndex + 1 < _consoleHistory.size())
|
||||||
{
|
{
|
||||||
_consoleHistoryIndex++;
|
_consoleHistoryIndex++;
|
||||||
_consoleCurrentLine = _consoleHistory[_consoleHistoryIndex];
|
_consoleCurrentLine = _consoleHistory[_consoleHistoryIndex];
|
||||||
|
|
Loading…
Reference in New Issue