From 725ebc929eb49e8f8ed85b9420fa26444a4ade2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Thu, 25 Jan 2024 19:21:54 +0100 Subject: [PATCH] Remove duplicate `if` branch --- src/game/client/components/menus_start.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/game/client/components/menus_start.cpp b/src/game/client/components/menus_start.cpp index 3e4c4a7fd..ba5e69c10 100644 --- a/src/game/client/components/menus_start.cpp +++ b/src/game/client/components/menus_start.cpp @@ -146,11 +146,7 @@ void CMenus::RenderStartMenu(CUIRect MainView) char aBuf[IO_MAX_PATH_LENGTH]; Storage()->GetBinaryPath(PLAT_SERVER_EXEC, aBuf, sizeof(aBuf)); // No / in binary path means to search in $PATH, so it is expected that the file can't be opened. Just try executing anyway. - if(str_find(aBuf, "/") == 0) - { - m_ServerProcess.m_Process = shell_execute(aBuf); - } - else if(fs_is_file(aBuf)) + if(str_find(aBuf, "/") == 0 || fs_is_file(aBuf)) { m_ServerProcess.m_Process = shell_execute(aBuf); }