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.
This commit is contained in:
Cary R 2008-10-07 13:27:48 -07:00 committed by Stephen Williams
parent c5d4d9eec1
commit c41fb50929
1 changed files with 2 additions and 2 deletions

View File

@ -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);