summaryrefslogtreecommitdiff
path: root/src/strife/d_main.c
diff options
context:
space:
mode:
authorFabian Greffrath2015-03-26 18:26:32 +0100
committerFabian Greffrath2015-03-26 18:26:32 +0100
commitb34294b67473e8d3ad4b8204327e03d91bcd6214 (patch)
tree0b7e7da19625236a552063e90111602422772e5b /src/strife/d_main.c
parent690a424ae8e8f549e05ba678b725aead3572cda9 (diff)
downloadchocolate-doom-b34294b67473e8d3ad4b8204327e03d91bcd6214.tar.gz
chocolate-doom-b34294b67473e8d3ad4b8204327e03d91bcd6214.tar.bz2
chocolate-doom-b34294b67473e8d3ad4b8204327e03d91bcd6214.zip
Add a wrapper with "void (void)" signature around G_CheckDemoStatus
This is meant to be passed over to I_AtExit() which expects an argument of void type. It thus prevents undefined behaviour because of the different signature of G_CheckDemoStatus() which is of boolean type. Fixes #519
Diffstat (limited to 'src/strife/d_main.c')
-rw-r--r--src/strife/d_main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index 35d2c908..186ba28b 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1285,6 +1285,11 @@ void D_IntroTick(void)
//
//=============================================================================
+static void G_CheckDemoStatusAtExit (void)
+{
+ G_CheckDemoStatus();
+}
+
//
// D_DoomMain
//
@@ -1634,7 +1639,7 @@ void D_DoomMain (void)
printf("Playing demo %s.\n", file);
}
- I_AtExit((atexit_func_t) G_CheckDemoStatus, true);
+ I_AtExit(G_CheckDemoStatusAtExit, true);
// Generate the WAD hash table. Speed things up a bit.