mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
Fix CON compiler line number accounting problem introduced with the optimization that transforms CON_SETVARVAR -> CON_SETVAR if the second parameter is a constant
git-svn-id: https://svn.eduke32.com/eduke32@7276 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
b4404978d6
commit
c287866954
1 changed files with 10 additions and 1 deletions
|
@ -3807,6 +3807,7 @@ setvar:
|
|||
setvarvar:
|
||||
auto ins = &g_scriptPtr[-1];
|
||||
auto tptr = textptr;
|
||||
int const lnum = g_lineNumber;
|
||||
|
||||
C_GetNextVarType(GAMEVAR_READONLY);
|
||||
C_GetNextVar();
|
||||
|
@ -3825,6 +3826,7 @@ setvarvar:
|
|||
scriptWriteAtOffset(opcode | LINE_NUMBER, ins);
|
||||
g_scriptPtr = &ins[1];
|
||||
textptr = tptr;
|
||||
g_lineNumber = lnum;
|
||||
goto setvar;
|
||||
}
|
||||
|
||||
|
@ -4120,7 +4122,7 @@ setvarvar:
|
|||
continue;
|
||||
|
||||
case CON_ACTIVATE:
|
||||
g_scriptPtr[-1] = CON_OPERATEACTIVATORS;
|
||||
g_scriptPtr[-1] = CON_OPERATEACTIVATORS | LINE_NUMBER;
|
||||
C_GetNextValue(LABEL_DEFINE);
|
||||
scriptWriteValue(0);
|
||||
continue;
|
||||
|
@ -4253,6 +4255,8 @@ setvarvar:
|
|||
{
|
||||
C_ReportError(ERROR_FOUNDWITHIN);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
}
|
||||
|
||||
g_scriptPtr--;
|
||||
|
@ -4265,6 +4269,7 @@ setvarvar:
|
|||
{
|
||||
C_ReportError(ERROR_EXCEEDSMAXTILES);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -4290,6 +4295,8 @@ setvarvar:
|
|||
{
|
||||
C_ReportError(ERROR_EXCEEDSMAXTILES);
|
||||
g_errorCnt++;
|
||||
scriptSkipLine();
|
||||
continue;
|
||||
}
|
||||
g_tile[j].cacherange = i;
|
||||
|
||||
|
@ -4324,6 +4331,7 @@ setvarvar:
|
|||
auto const ins = &g_scriptPtr[-1];
|
||||
auto const lastScriptPtr = &g_scriptPtr[-1] - apScript;
|
||||
auto const lasttextptr = textptr;
|
||||
int const lnum = g_lineNumber;
|
||||
|
||||
g_skipBranch = false;
|
||||
|
||||
|
@ -4347,6 +4355,7 @@ setvarvar:
|
|||
tw = opcode;
|
||||
g_scriptPtr = &ins[1];
|
||||
textptr = lasttextptr;
|
||||
g_lineNumber = lnum;
|
||||
goto ifvar;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue