G_DoPlayDemo: Make sure buffer is NULL so you can watch replays immediately after recording them.

This is yet another g_demo.c-specific hack, and has been marked as such.
This commit is contained in:
toaster 2023-07-17 18:09:11 +01:00
parent 5b4fc18264
commit bf8d09980d

View file

@ -3060,6 +3060,10 @@ void G_DoPlayDemo(const char *defdemoname)
}
else
{
// FIXME: this file doesn't manage its memory and actually free this when it's done using it
Z_Free(demobuf.buffer);
demobuf.buffer = NULL;
n = defdemoname+strlen(defdemoname);
while (*n != '/' && *n != '\\' && n != defdemoname)
n--;