Fix VHDL code generator crash when a ternary operator has a real operand.

This commit is contained in:
Martin Whitaker 2013-04-12 23:46:06 +01:00
parent 46f63db746
commit 4c52f66f5d
1 changed files with 2 additions and 0 deletions

View File

@ -420,6 +420,8 @@ void make_assignment(vhdl_procedural *proc, stmt_container *container,
if (ivl_expr_type(rval) == IVL_EX_TERNARY) {
rhs = translate_expr(ivl_expr_oper2(rval));
rhs2 = translate_expr(ivl_expr_oper3(rval));
if (rhs2 == NULL)
return;
}
else
rhs = translate_expr(rval);