G_DoPlayDemo: fix demoname becoming garbage when replay restarts/rewinds
only used in the error paths, which we shouldnt reach but im not a fan of having a chance of putting garbo in the console
This commit is contained in:
1 parent
fbc46f0b23
commit
43d2ad7b78
1 file changed
+2
-2
+2
-2
@@ -2616,7 +2616,7 @@ void G_DoPlayDemo(char *defdemoname)
|
||||
if (defdemoname == NULL)
|
||||
{
|
||||
demobuf.p = demobuf.buffer;
|
||||
pdemoname = ZZ_Alloc(1); // Easier than adding checks for this everywhere it's freed
|
||||
pdemoname = ZZ_Calloc(1); // Easier than adding checks for this everywhere it's freed
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2628,7 +2628,7 @@ void G_DoPlayDemo(char *defdemoname)
|
||||
n++;
|
||||
|
||||
pdemoname = ZZ_Alloc(strlen(n)+1);
|
||||
strcpy(pdemoname,n);
|
||||
strcpy(pdemoname, n);
|
||||
|
||||
M_SetPlaybackMenuPointer();
|
||||
|
||||
|
||||
Reference in new issue
Block a user