From f0264b11401d8d37fe58d8babe6c6dae0d24d7f6 Mon Sep 17 00:00:00 2001 From: terminx Date: Wed, 29 Aug 2007 05:02:43 +0000 Subject: [PATCH] git-svn-id: https://svn.eduke32.com/eduke32@568 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 33 +++++++++++++++---------------- polymer/eduke32/source/savegame.c | 3 +++ 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 11a819a9f..9aa9ec8f1 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -1483,18 +1483,17 @@ static int parsecommand(void) long ocasescriptptr = (unsigned)(casescriptptr-script); long oparsing_event = (unsigned)(parsing_event-script); long oparsing_actor = (unsigned)(parsing_actor-script); - long olabelcode[MAXSECTORS]; long *scriptptrs; - Bmemset(&olabelcode,0,sizeof(olabelcode)); - - for (j=0;j= (long)(&script[0]) && (long)script[i] < (long)(&script[g_ScriptSize])) @@ -1530,7 +1529,7 @@ static int parsecommand(void) //initprintf("offset: %ld\n",(unsigned)(scriptptr-script)); g_ScriptSize += 16384; initprintf("Increasing script buffer size to %ld bytes...\n",g_ScriptSize); - script = (long *)realloc(script, (g_ScriptSize+16) * sizeof(long)); + script = (long *)realloc(script, g_ScriptSize * sizeof(long)); if (script == NULL) { @@ -1549,11 +1548,11 @@ static int parsecommand(void) if (parsing_actor != NULL) parsing_actor = (long *)(script+oparsing_actor); - for (j=0;j