pass buffer size to M_snprintf() instead of string length

This commit is contained in:
Fabian Greffrath 2019-01-23 21:21:39 +01:00
parent 82109a9cc0
commit fff2e0e058

View file

@ -638,12 +638,12 @@ static void SetDefaultSaveName(int slot)
// map from IWAD or PWAD?
if (maplumpinfo->wad_file == lumpinfo[0]->wad_file)
{
M_snprintf(savegamestrings[itemOn], SAVESTRINGSIZE - 1,
M_snprintf(savegamestrings[itemOn], SAVESTRINGSIZE,
"%s", maplumpinfo->name);
}
else
{
M_snprintf(savegamestrings[itemOn], SAVESTRINGSIZE - 1,
M_snprintf(savegamestrings[itemOn], SAVESTRINGSIZE,
"%s: %s", M_BaseName(maplumpinfo->wad_file->path),
maplumpinfo->name);
}