Skip to content

Commit

Permalink
pass buffer size to M_snprintf() instead of string length
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed Jan 23, 2019
1 parent 82109a9 commit fff2e0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doom/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit fff2e0e

Please sign in to comment.