diff options
author | Simon Howard | 2010-12-25 20:55:30 +0000 |
---|---|---|
committer | Simon Howard | 2010-12-25 20:55:30 +0000 |
commit | c67b4c15dc32f9824951f37c9b1fa665b7d1307f (patch) | |
tree | 09f6a6c986ef0445de3336502f87457c048a2f17 | |
parent | 58b73530462fad1ab872ef5c60afbfcaaa08eff1 (diff) | |
download | chocolate-doom-c67b4c15dc32f9824951f37c9b1fa665b7d1307f.tar.gz chocolate-doom-c67b4c15dc32f9824951f37c9b1fa665b7d1307f.tar.bz2 chocolate-doom-c67b4c15dc32f9824951f37c9b1fa665b7d1307f.zip |
Remove the 32 character limit on the lengths of filenames specified to
-record (thanks AlexXav).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2225
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | src/g_game.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -83,6 +83,8 @@ option is provided (thanks Sander van Dijk). * Skill level names in the setup tool are now written the same as they are on the in-game "new game" menu (thanks AlexXav). + * There is no longer a limit on the lengths of filenames provided + to the -record command line parameter (thanks AlexXav). libtextscreen: * The font used for the textscreen library can be forced by diff --git a/src/g_game.c b/src/g_game.c index 7790b83e..f91e630e 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -139,7 +139,7 @@ int gametic; int levelstarttic; // gametic at level start int totalkills, totalitems, totalsecret; // for intermission -char demoname[32]; +char *demoname; boolean demorecording; boolean longtics; // cph's doom 1.91 longtics hack boolean lowres_turn; // low resolution turning for longtics @@ -2050,14 +2050,14 @@ void G_WriteDemoTiccmd (ticcmd_t* cmd) // // G_RecordDemo // -void G_RecordDemo (char* name) +void G_RecordDemo (char *name) { int i; int maxsize; usergame = false; - strcpy (demoname, name); - strcat (demoname, ".lmp"); + demoname = Z_Malloc(strlen(name) + 5, PU_STATIC, NULL); + sprintf(demoname, "%s.lmp", name); maxsize = 0x20000; //! |