From 0b2273b8481f0b20a8fcc9e31635dfe030a17cc5 Mon Sep 17 00:00:00 2001 From: James R Date: Tue, 14 Feb 2023 02:45:26 -0800 Subject: [PATCH] p_saveg.c: replace unknown thinker error with assert It is undefined behavior to cast function pointer to void*. --- src/p_saveg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_saveg.c b/src/p_saveg.c index b7f57514e..0420d0520 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -3135,8 +3135,8 @@ static void P_NetArchiveThinkers(savebuffer_t *save) continue; } #ifdef PARANOIA - else if (th->function.acp1 != (actionf_p1)P_RemoveThinkerDelayed) // wait garbage collection - I_Error("unknown thinker type %p", th->function.acp1); + else + I_Assert(th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed); // wait garbage collection #endif }