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;
|
||||
}
|
||||
|
||||
if (switchNodes.Size() > 0)
|
||||
{
|
||||
int i = 1, j = 1;
|
||||
while (i < switchNodes.Size())
|
||||
{
|
||||
|
@ -5312,6 +5314,7 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration*
|
|||
i++;
|
||||
}
|
||||
switchNodes.SetSize(j);
|
||||
}
|
||||
|
||||
BuildSwitchTree(proc, exp, sblock, inlineMapper, vl, switchNodes, 0, switchNodes.Size(), vleft, vright, dblock ? dblock : eblock);
|
||||
|
||||
|
|
Loading…
Reference in New Issue