From 15e98c6e1fd7d7e1ca35a14aef4df5f9b6089053 Mon Sep 17 00:00:00 2001 From: Yousef Khadadeh Date: Wed, 11 Mar 2026 15:48:56 +0300 Subject: [PATCH] Fixed mistake with vector empty check --- src/InputManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InputManager.cpp b/src/InputManager.cpp index bebd330..b6e16e3 100644 --- a/src/InputManager.cpp +++ b/src/InputManager.cpp @@ -856,7 +856,7 @@ void InputManager::backend_key_down_update(const SDL_KeyboardEvent& e) { std::shared_ptr textBox = text.textBoxes.empty() ? nullptr : text.textBoxes.front().textBox; std::shared_ptr cursor = text.textBoxes.empty() ? nullptr : text.textBoxes.front().cursor; - std::optional modMap = text.textBoxes.empty() ? shared_ptr_to_opt(text.textBoxes.front().modMap) : std::nullopt; + std::optional modMap = text.textBoxes.empty() ? std::nullopt : shared_ptr_to_opt(text.textBoxes.front().modMap); switch(kPress) { case SDLK_UP: