From 0512e65dbe88fc9b534f9eca1cc4b5a296fd1aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20M=C3=BCller?= Date: Tue, 16 Jan 2024 20:10:03 +0100 Subject: [PATCH] Fix warning title being uninitialized in some cases For some warnings a random title instead of the default title was shown because it was not initialized. --- src/engine/client/warning.cpp | 1 - src/engine/warning.h | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine/client/warning.cpp b/src/engine/client/warning.cpp index 0ed4a9daa..b15ed4c1f 100644 --- a/src/engine/client/warning.cpp +++ b/src/engine/client/warning.cpp @@ -4,7 +4,6 @@ SWarning::SWarning(const char *pMsg) { - str_copy(m_aWarningTitle, ""); str_copy(m_aWarningMsg, pMsg); } SWarning::SWarning(const char *pTitle, const char *pMsg) diff --git a/src/engine/warning.h b/src/engine/warning.h index bd1e45e75..4532a1035 100644 --- a/src/engine/warning.h +++ b/src/engine/warning.h @@ -7,8 +7,8 @@ struct SWarning SWarning(const char *pMsg); SWarning(const char *pTitle, const char *pMsg); - char m_aWarningTitle[128]; - char m_aWarningMsg[256]; + char m_aWarningTitle[128] = ""; + char m_aWarningMsg[256] = ""; bool m_WasShown = false; bool m_AutoHide = true; };