components/prboom/g_game.c
/* killough 3/22/98: form savegame name in one location
 * (previously code was scattered around in multiple places)
 * cph - Avoid possible buffer overflow problems by passing
 * size to this function and using snprintf */
killough 3/22/98: form savegame name in one location
(previously code was scattered around in multiple places)
cph - Avoid possible buffer overflow problems by passing
size to this function and using snprintf
killough 3 / 22 / 98 : form savegame name in one location ( previously code was scattered around in multiple places ) cph - Avoid possible buffer overflow problems by passing size to this function and using snprintf
void G_SaveGameName(char *name, size_t size, int slot, boolean demoplayback)
{
  const char* sgn = demoplayback ? "demosav" : savegamename;
#ifdef HAVE_SNPRINTF
  snprintf (name, size, "%s/%s%d.dsg", basesavegame, sgn, slot);
#else
  sprintf (name, "%s/%s%d.dsg", basesavegame, sgn, slot);
#endif
}
void G_SaveGameName ( char * name , size_t size , int slot , boolean demoplayback ) { const char * sgn = demoplayback ? " " : savegamename ; #ifdef HAVE_SNPRINTF snprintf ( name , size , " " , basesavegame , sgn , slot ) ; #else sprintf ( name , " " , basesavegame , sgn , slot ) ; #endif }
killough 3/22/98: form savegame name in one location
 (previously code was scattered around in multiple places)
 cph - Avoid possible buffer overflow problems by passing
 size to this function and using snprintf
killough 3 / 22 / 98 : form savegame name in one location ( previously code was scattered around in multiple places ) cph - Avoid possible buffer overflow problems by passing size to this function and using snprintf