Fix crash on select statement with void result
This commit is contained in:
parent
2f5faaa5ab
commit
5d7dcf9373
|
@ -4828,6 +4828,8 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration*
|
|||
}
|
||||
}
|
||||
|
||||
if (ttype != IT_NONE)
|
||||
{
|
||||
ttemp = proc->AddTemporary(ttype);
|
||||
|
||||
InterInstruction* rins = new InterInstruction(MapLocation(exp, inlineMapper), IC_LOAD_TEMPORARY);
|
||||
|
@ -4854,6 +4856,19 @@ InterCodeGenerator::ExValue InterCodeGenerator::TranslateExpression(Declaration*
|
|||
|
||||
return ExValue(dtype, ttemp);
|
||||
}
|
||||
else
|
||||
{
|
||||
tblock->Append(jins0);
|
||||
tblock->Close(eblock, nullptr);
|
||||
|
||||
fblock->Append(jins1);
|
||||
fblock->Close(eblock, nullptr);
|
||||
|
||||
block = eblock;
|
||||
|
||||
return ExValue();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue