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