(svn r7280) -Codechange: Replace some sprintf() functions with the safer snprintf() functions

This commit is contained in:
Darkvater
2006-11-28 20:55:16 +00:00
parent ea965a4adf
commit b9eed21679
8 changed files with 21 additions and 20 deletions

View File

@@ -281,7 +281,7 @@ DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP)
Packet *p;
// Make a dump of the current game
sprintf(filename, "%s%snetwork_server.tmp", _path.autosave_dir, PATHSEP);
snprintf(filename, lengthof(filename), "%s%snetwork_server.tmp", _path.autosave_dir, PATHSEP);
if (SaveOrLoad(filename, SL_SAVE) != SL_OK) error("network savedump failed");
file_pointer = fopen(filename, "rb");