Fix CON commands leaving useless extra values in the bytecode. They were only valid outside of executable blocks so it was never noticed.

git-svn-id: https://svn.eduke32.com/eduke32@7277 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-12-15 01:39:14 +00:00
parent c287866954
commit ef91435120

View file

@ -4148,11 +4148,15 @@ setvarvar:
C_GetNextValue(LABEL_DEFINE);
j = g_scriptPtr[-1];
g_scriptPtr--;
C_GetNextValue(LABEL_DEFINE);
y = g_scriptPtr[-1];
g_scriptPtr--;
C_GetNextValue(LABEL_DEFINE);
z = g_scriptPtr[-1];
g_scriptPtr--;
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXTILES))
{
@ -4177,6 +4181,7 @@ setvarvar:
C_GetNextValue(LABEL_DEFINE);
j = g_scriptPtr[-1];
g_scriptPtr--;
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXTILES))
{
@ -4202,8 +4207,11 @@ setvarvar:
C_GetNextValue(LABEL_DEFINE);
i = g_scriptPtr[-1];
g_scriptPtr--;
C_GetNextValue(LABEL_DEFINE);
j = g_scriptPtr[-1];
g_scriptPtr--;
if (EDUKE32_PREDICT_FALSE((unsigned)i >= MAXTILES || (unsigned)j >= MAXTILES))
{
@ -4222,16 +4230,18 @@ setvarvar:
if (!g_scriptActorOffset && g_processingState == 0)
{
g_scriptPtr--;
auto tmpscrptr = g_scriptPtr;
C_GetNextValue(LABEL_DEFINE);
g_scriptPtr--;
j = *g_scriptPtr;
j = g_scriptPtr[-1];
int32_t flags = 0;
do
C_BitOrNextValue(&flags);
while (C_GetKeyword() == -1);
g_scriptPtr = tmpscrptr;
if (EDUKE32_PREDICT_FALSE((unsigned)j >= MAXTILES))
{
C_ReportError(ERROR_EXCEEDSMAXTILES);
@ -4240,10 +4250,8 @@ setvarvar:
}
g_tile[j].flags = flags;
continue;
}
C_GetNextVar();
else C_GetNextVar();
continue;
case CON_PRECACHE: