From f09bdc472b3ee6665328a5e256ceff24d38fd8af Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Sat, 8 Apr 2023 19:14:00 +0200 Subject: [PATCH] Suppress compiler warning and avoid potential bug The string literal will never change during runtime; this commit is to make sure no mistakes are made in future refactors. --- r5dev/engine/host_state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r5dev/engine/host_state.cpp b/r5dev/engine/host_state.cpp index c262356b..07d514d0 100644 --- a/r5dev/engine/host_state.cpp +++ b/r5dev/engine/host_state.cpp @@ -460,7 +460,7 @@ void CHostState::State_ChangeLevelMP(void) void CHostState::ResetLevelName(void) { static const char* szNoMap = "no_map"; - Q_snprintf(const_cast(m_levelName), sizeof(m_levelName), szNoMap); + Q_snprintf(const_cast(m_levelName), sizeof(m_levelName), "%s", szNoMap); } void VHostState::Attach(void) const