From c41fb50929624840332dcc2c4ae463720983821a Mon Sep 17 00:00:00 2001 From: Cary R Date: Tue, 7 Oct 2008 13:27:48 -0700 Subject: [PATCH] Copy from the existing function when duping a system function. This code was likely never checked properly since it makes no sense to copy the expression from the new temporary system function. You must copy the value from the current function. --- dup_expr.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dup_expr.cc b/dup_expr.cc index c6bf13416..91b6bc867 100644 --- a/dup_expr.cc +++ b/dup_expr.cc @@ -94,8 +94,8 @@ NetESFunc* NetESFunc::dup_expr() const tmp->cast_signed(has_sign()); for (unsigned idx = 0 ; idx < nparms() ; idx += 1) { - assert(tmp->parm(idx)); - tmp->parm(idx, tmp->parm(idx)->dup_expr()); + assert(parm(idx)); + tmp->parm(idx, parm(idx)->dup_expr()); } tmp->set_line(*this);