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
This commit is contained in:
helixhorned 2011-12-21 18:41:55 +00:00
parent 89d321c01f
commit eee507741d

View file

@ -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);