pass buffer size to M_snprintf() instead of string length
This commit is contained in:
parent
82109a9cc0
commit
fff2e0e058
1 changed files with 2 additions and 2 deletions
|
|
@ -638,12 +638,12 @@ static void SetDefaultSaveName(int slot)
|
||||||
// map from IWAD or PWAD?
|
// map from IWAD or PWAD?
|
||||||
if (maplumpinfo->wad_file == lumpinfo[0]->wad_file)
|
if (maplumpinfo->wad_file == lumpinfo[0]->wad_file)
|
||||||
{
|
{
|
||||||
M_snprintf(savegamestrings[itemOn], SAVESTRINGSIZE - 1,
|
M_snprintf(savegamestrings[itemOn], SAVESTRINGSIZE,
|
||||||
"%s", maplumpinfo->name);
|
"%s", maplumpinfo->name);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
M_snprintf(savegamestrings[itemOn], SAVESTRINGSIZE - 1,
|
M_snprintf(savegamestrings[itemOn], SAVESTRINGSIZE,
|
||||||
"%s: %s", M_BaseName(maplumpinfo->wad_file->path),
|
"%s: %s", M_BaseName(maplumpinfo->wad_file->path),
|
||||||
maplumpinfo->name);
|
maplumpinfo->name);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue