Fix switch/case regressions introduced in r5577.

git-svn-id: https://svn.eduke32.com/eduke32@5594 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2016-01-27 10:06:00 +00:00
parent 93884b1a91
commit 798685ee80

View file

@ -4837,12 +4837,12 @@ DO_DEFSTATE:
g_checkingCase++; g_checkingCase++;
repeatcase: repeatcase:
g_scriptPtr--; g_scriptPtr--;
g_numCases++;
C_SkipComments(); C_SkipComments();
if (tw == CON_CASE) if (tw == CON_CASE)
{ {
g_numCases++;
C_GetNextValue(LABEL_DEFINE); C_GetNextValue(LABEL_DEFINE);
j= *(--g_scriptPtr); j= *(--g_scriptPtr);
} }
@ -4887,6 +4887,7 @@ repeatcase:
{ {
//AddLog("Found Repeat Case"); //AddLog("Found Repeat Case");
C_GetNextKeyword(); // eat keyword C_GetNextKeyword(); // eat keyword
tw = j;
goto repeatcase; goto repeatcase;
} }
@ -4900,11 +4901,11 @@ repeatcase:
{ {
C_GetNextKeyword(); // eat keyword C_GetNextKeyword(); // eat keyword
tempscrptr = (intptr_t *)(script+tempoffset); tempscrptr = (intptr_t *)(script+tempoffset);
tw = j;
goto repeatcase; goto repeatcase;
} }
} }
tempscrptr = (intptr_t *)(script+tempoffset);
continue; continue;
} }