From 1a214939d7e1332ba56605ec83e2b60422d75834 Mon Sep 17 00:00:00 2001 From: terminx Date: Sat, 7 Aug 2010 23:14:23 +0000 Subject: [PATCH] Possibly fix another weird crash git-svn-id: https://svn.eduke32.com/eduke32@1688 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/game.c | 6 +----- polymer/eduke32/source/rts.h | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 635fa68ea..f7d68f45d 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -106,10 +106,6 @@ int32_t voting = -1; int32_t vote_map = -1, vote_episode = -1; static int32_t g_Debug = 0; - -extern int32_t rts_numlumps; - - static int32_t g_noLogoAnim = 0; static int32_t g_noLogo = 0; @@ -6164,7 +6160,7 @@ PALONLY: } */ - if (t4 && t4 != 1) + if ((intptr_t *)t4 >= &script[0] && (intptr_t *)t4 <= (&script[0]+g_scriptSize)) { l = *(((intptr_t *)t4)+2); //For TerminX: was *(int32_t *)(t4+8) diff --git a/polymer/eduke32/source/rts.h b/polymer/eduke32/source/rts.h index 2820afc9f..c0207b983 100644 --- a/polymer/eduke32/source/rts.h +++ b/polymer/eduke32/source/rts.h @@ -30,6 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define __rts_public__ extern char rts_lumplockbyte[11]; +extern int32_t rts_numlumps; /* ====================