From ecce1d25bc4e034423584a9386dcf4d8b30d58c0 Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Sat, 15 Feb 2014 23:05:41 +0000 Subject: [PATCH] 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. --- eval_tree.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eval_tree.cc b/eval_tree.cc index 0577c134e..b51a77faa 100644 --- a/eval_tree.cc +++ b/eval_tree.cc @@ -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;