Fix for GitHub issue 12 : Ternary lval-rval width mismatch.

A simple typing error that caused the expression to be incorrectly
evaluated as a real constant.
This commit is contained in:
Martin Whitaker 2014-02-15 23:05:41 +00:00
parent 66bdbb77ec
commit ecce1d25bc
1 changed files with 1 additions and 1 deletions

View File

@ -1346,7 +1346,7 @@ NetExpr*NetETernary::blended_arguments_(const NetExpr*te, const NetExpr*fe) cons
if (t == 0 || f == 0) {
verireal tv, fv;
if (!get_real_arg_(te, tv)) return 0;
if (!get_real_arg_(te, fv)) return 0;
if (!get_real_arg_(fe, fv)) return 0;
verireal val = verireal(0.0);
if (tv.as_double() == fv.as_double()) val = tv;