Fix compiler crash with empty switch statement
This commit is contained in:
parent
f0f174e439
commit
381aaa1509
|
@ -5302,6 +5302,8 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration*
|
||||||
sexp = sexp->mRight;
|
sexp = sexp->mRight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (switchNodes.Size() > 0)
|
||||||
|
{
|
||||||
int i = 1, j = 1;
|
int i = 1, j = 1;
|
||||||
while (i < switchNodes.Size())
|
while (i < switchNodes.Size())
|
||||||
{
|
{
|
||||||
|
@ -5312,6 +5314,7 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration*
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
switchNodes.SetSize(j);
|
switchNodes.SetSize(j);
|
||||||
|
}
|
||||||
|
|
||||||
BuildSwitchTree(proc, exp, sblock, inlineMapper, vl, switchNodes, 0, switchNodes.Size(), vleft, vright, dblock ? dblock : eblock);
|
BuildSwitchTree(proc, exp, sblock, inlineMapper, vl, switchNodes, 0, switchNodes.Size(), vleft, vright, dblock ? dblock : eblock);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue