Permalink
Browse files

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.
  • Loading branch information...
1 parent c5d4d9e commit c41fb50929624840332dcc2c4ae463720983821a @caryr caryr committed with Oct 7, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 dup_expr.cc
View
@@ -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);

0 comments on commit c41fb50

Please sign in to comment.