From b6cc96ad687e994304d2dcc7212da3a981794d11 Mon Sep 17 00:00:00 2001 From: fickleheart Date: Sat, 16 Feb 2019 22:19:05 -0600 Subject: [PATCH] Fix replays crashing upon completion --- src/g_game.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/g_game.c b/src/g_game.c index 490b55bd..6dca67fb 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -5402,6 +5402,13 @@ void G_ConsAllGhostTics(void) G_ConsGhostTic(p); p = READUINT8(demo_p); } + + if (*demo_p == DEMOMARKER) + { + // end of demo data stream + G_CheckDemoStatus(); + return; + } } // Uses ghost data to do consistency checks on your position.