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.
This commit is contained in:
Robert Müller 2024-01-16 20:10:03 +01:00
parent bb3bd57c0e
commit 0512e65dbe
2 changed files with 2 additions and 3 deletions

View file

@ -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)

View file

@ -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;
};