From 4bffa72c458b93c499427802c3de76a17da146fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 18 Jun 2023 15:39:26 +0300 Subject: [PATCH 1/2] Fix #20413: Crash attempting to navigate an empty console history --- src/openrct2-ui/interface/InGameConsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2-ui/interface/InGameConsole.cpp b/src/openrct2-ui/interface/InGameConsole.cpp index 31c7a26ed5..dd53d0ee23 100644 --- a/src/openrct2-ui/interface/InGameConsole.cpp +++ b/src/openrct2-ui/interface/InGameConsole.cpp @@ -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]; From edfbf797202a0afa7312fd1ef5b7489a869cfe6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 18 Jun 2023 16:22:32 +0300 Subject: [PATCH 2/2] Update changelog.txt --- distribution/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 95a06ead0f..f6f4be745f 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -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) ------------------------------------------------------------------------