Skip to content

Commit

Permalink
Corrected month number in demo file name
Browse files Browse the repository at this point in the history
You need to add 1 to the month number because month number is from 0 to
12 and not from 1 to 12.
(http://www.cplusplus.com/reference/clibrary/ctime/tm/)
  • Loading branch information
blapecool committed May 23, 2012
1 parent b0d0f70 commit 384d356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/server/sv_ccmds.c
Expand Up @@ -998,7 +998,7 @@ static void SV_NameServerDemo(char *filename, int length, const client_t *client
// file extension
Com_sprintf(
filename, length-1, "serverdemos/%.4d_%.2d_%.2d_%.2d-%.2d-%.2d_%s_%d.dm_%d",
time.tm_year+1900, time.tm_mon, time.tm_mday,
time.tm_year+1900, time.tm_mon+1, time.tm_mday,
time.tm_hour, time.tm_min, time.tm_sec,
playername,
Sys_Milliseconds(),
Expand Down

0 comments on commit 384d356

Please sign in to comment.