From 5984bdea19ae358034f499a4330bde2908584594 Mon Sep 17 00:00:00 2001 From: Archez Date: Mon, 8 Jul 2024 23:47:42 -0400 Subject: [PATCH] Fix crash with graphics menu index out of bounds (#738) --- README.md | 4 ++-- mm/2s2h/BenGui/BenMenuBar.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b4173bec7..80f507ede 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ If you're having any trouble after reading through this `README`, feel free ask ### 1. Verify your ROM dump You can verify you have dumped a supported copy of the game by using the compatibility checker at https://2ship.equipment/. If you'd prefer to manually validate your ROM dump, you can cross-reference its `sha1` hash with the hashes [here](docs/supportedHashes.json). -### 2. Download The Ship of Harkinian from [Releases](https://github.com/HarbourMasters/2Ship2Harkinian/releases) +### 2. Download 2 Ship 2 Harkinian from [Releases](https://github.com/HarbourMasters/2Ship2Harkinian/releases) ### 3. Launch the Game! #### Windows @@ -25,7 +25,7 @@ You can verify you have dumped a supported copy of the game by using the compati #### Linux * Place your supported copy of the game in the same folder as the appimage. -* Execute `2ship.appimage`. You may have to `chmod +x` the appimage via terminal. +* Execute `2ship.appimage`. You may have to `chmod +x` the appimage via terminal. #### macOS * Run `2ship.app`. diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index 2b80702bc..1d0f6ec6f 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -62,7 +62,6 @@ Ship::WindowBackend configWindowBackend; void UpdateWindowBackendObjects() { Ship::WindowBackend runningWindowBackend = Ship::Context::GetInstance()->GetWindow()->GetWindowBackend(); - Ship::WindowBackend configWindowBackend; int32_t configWindowBackendId = Ship::Context::GetInstance()->GetConfig()->GetInt("Window.Backend.Id", -1); if (configWindowBackendId != -1 && configWindowBackendId < static_cast(Ship::WindowBackend::BACKEND_COUNT)) { configWindowBackend = static_cast(configWindowBackendId);