From eee507741d0e5899e2d7ccafce199abd0fefee12 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Wed, 21 Dec 2011 18:41:55 +0000 Subject: [PATCH] CON parser cleanup: In C_Compile, initially clear three arrays with Bmemset(..., 0, sizeof(...)) instead of clearbuf(..., MAX..., 0), because the latter would clear only half of the data on 64-bit platforms. git-svn-id: https://svn.eduke32.com/eduke32@2189 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/gamedef.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 9bc39bfd9..4069c9b59 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -2646,6 +2646,7 @@ static int32_t C_ParseCommand(int32_t loop) C_GetNextValue(LABEL_ACTION); break; case 2: + // XXX: LABEL_MOVE|LABEL_DEFINE, what is this shit? compatibility? if ((C_GetNextValue(LABEL_MOVE|LABEL_DEFINE) == 0) && (*(g_scriptPtr-1) != 0) && (*(g_scriptPtr-1) != 1)) { C_ReportError(-1); @@ -5768,9 +5769,9 @@ void C_Compile(const char *filenam) kread(fp,(char *)textptr,fs); kclose(fp); - clearbuf(actorscrptr,MAXTILES,0L); // JBF 20040531: MAXSPRITES? I think Todd meant MAXTILES... - clearbuf(actorLoadEventScrptr,MAXTILES,0L); // I think this should be here... - clearbufbyte(ActorType,MAXTILES,0L); + Bmemset(actorscrptr, 0, sizeof(actorscrptr)); + Bmemset(actorLoadEventScrptr, 0, sizeof(actorLoadEventScrptr)); + Bmemset(ActorType, 0, sizeof(ActorType)); // clearbufbyte(script,sizeof(script),0l); // JBF 20040531: yes? no? if (script != NULL) Bfree(script);