From e86ae4b22b052c19efca448fb91b62b109d1a18b Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 5 Mar 2024 02:56:34 -0800 Subject: [PATCH] G_AddGhost, G_GetStaffGhostBrief: fix bugged unlockables code This was causing the following crash: I_Error(): Ghost is not a record attack ghost DXD (ziptic = 1) --- src/g_demo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_demo.cpp b/src/g_demo.cpp index fbeb4d98d..444138b21 100644 --- a/src/g_demo.cpp +++ b/src/g_demo.cpp @@ -3591,7 +3591,7 @@ void G_AddGhost(savebuffer_t *buffer, const char *defdemoname) // Skip unlockables { UINT32 unlockables = READUINT32(p); - p += std::min(unlockables, MAXUNLOCKABLES); + p += unlockables; } p++; // mapmusrng @@ -3814,7 +3814,7 @@ staffbrief_t *G_GetStaffGhostBrief(UINT8 *buffer) // Skip unlockables { UINT32 unlockables = READUINT32(p); - p += std::min(unlockables, MAXUNLOCKABLES); + p += unlockables; } p++; // mapmusrng