From 924ff39aa48df1d6cd985b42a2fe5a60ff154030 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Wed, 3 Dec 2014 13:28:16 +0300 Subject: Stop fiddling around with jmp_buf. Implement custom abort function handler for cleaning up CM after failed server startup. Less hacky and more portable than previous solution that involved swapping copies of jmp_buf around. Fixes a weird Win64 crash when loading savegames. --- inc/common/common.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'inc/common/common.h') diff --git a/inc/common/common.h b/inc/common/common.h index 643a9f1..1ed0a20 100644 --- a/inc/common/common.h +++ b/inc/common/common.h @@ -21,7 +21,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "common/cmd.h" #include "common/utils.h" -#include // // common.h -- definitions common between client and server, but not game.dll @@ -83,6 +82,8 @@ typedef void (*rdflush_t)(int target, char *buffer, size_t len); void Com_BeginRedirect(int target, char *buffer, size_t buffersize, rdflush_t flush); void Com_EndRedirect(void); +void Com_AbortFunc(void (*func)(void *), void *arg); + #ifdef _WIN32 void Com_AbortFrame(void); #endif @@ -175,8 +176,6 @@ extern unsigned time_before_ref; extern unsigned time_after_ref; #endif -extern jmp_buf com_abortframe; - extern const char com_version_string[]; extern unsigned com_framenum; -- cgit v1.2.3