From bf8d09980db86a940f15307b6fe38458aa6ee2bf Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 17 Jul 2023 18:09:11 +0100 Subject: [PATCH] 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. --- src/g_demo.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/g_demo.c b/src/g_demo.c index 5b8a5854e..9b66237eb 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -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--;