From 26cc7dde2ffef927d721c43ec79dabadf2554477 Mon Sep 17 00:00:00 2001 From: bencie Date: Thu, 29 Feb 2024 18:37:39 +0100 Subject: [PATCH] Refactor --- src/game/client/components/background.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/components/background.cpp b/src/game/client/components/background.cpp index 065f0da03..1d7c41c61 100644 --- a/src/game/client/components/background.cpp +++ b/src/game/client/components/background.cpp @@ -60,7 +60,7 @@ void CBackground::LoadBackground() bool NeedImageLoading = false; char aBuf[IO_MAX_PATH_LENGTH]; - str_format(aBuf, sizeof(aBuf), str_endswith_nocase(g_Config.m_ClBackgroundEntities, ".map") ? "maps/%s" : "maps/%s.map", g_Config.m_ClBackgroundEntities); + str_format(aBuf, sizeof(aBuf), "maps/%s%s", g_Config.m_ClBackgroundEntities, str_endswith(g_Config.m_ClBackgroundEntities, ".map") ? "" : ".map"); if(str_comp(g_Config.m_ClBackgroundEntities, CURRENT_MAP) == 0) { m_pMap = Kernel()->RequestInterface();