Fix crash on select statement with void result

This commit is contained in:
drmortalwombat 2024-09-20 13:26:59 +02:00
parent 2f5faaa5ab
commit 5d7dcf9373

View File

@ -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;
}