Prevent profile player name from writing out of bounds

This commit is contained in:
SinnamonLat 2022-02-26 10:45:27 +01:00
parent 5801d67706
commit 964d503988

View file

@ -3775,7 +3775,7 @@ void M_HandleProfileEdit(void)
strncpy(optionsmenu.profile->profilename, cv_dummyprofilename.string, PROFILENAMELEN);
if (strlen(cv_dummyprofileplayername.string))
strcpy(optionsmenu.profile->playername, cv_dummyprofileplayername.string);
strncpy(optionsmenu.profile->playername, cv_dummyprofileplayername.string, MAXPLAYERNAME);
}
// special menuitem key handler for video mode list