fixup Valgrind warning:

Conditional jump or move depends on uninitialised value(s)
strncpy (vg_replace_strmem.c:599)
MIT_SetCurBackground (m_menu.c:2650)
M_IterateMenuTree (m_menu.c:2581)
M_SetMenuCurBackground (m_menu.c:2790)
F_InitMenuPresValues (f_finale.c:2276)
D_StartTitle (d_main.c:998)
G_Responder (g_game.c:2117)
D_ProcessEvents (d_main.c:282)
Local_Maketic (d_clisrv.c:5297)
NetUpdate (d_clisrv.c:5701)
TryRunTics (d_clisrv.c:5371)
D_SRB2Loop (d_main.c:820)
This commit is contained in:
Alam Ed Arias 2024-01-07 13:09:47 -05:00
parent 5b6c24281d
commit caaeaef6cc

View file

@ -2785,7 +2785,7 @@ void M_ChangeMenuMusic(const char *defaultmusname, boolean defaultmuslooping)
void M_SetMenuCurBackground(const char *defaultname)
{
char name[9];
char name[9] = "";
strncpy(name, defaultname, 8);
M_IterateMenuTree(MIT_SetCurBackground, &name);
}