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; /* ====================