Initialize real value in automatic functions.

alloc_instance for real values was just passing a new double
to be added to the context items. The new constructor does
not set the default value so we need to do that manually.
This commit is contained in:
Cary R 2008-09-29 19:10:00 -07:00 committed by Stephen Williams
parent 55a15d604d
commit 716853699f
1 changed files with 3 additions and 1 deletions

View File

@ -2886,7 +2886,9 @@ vvp_fun_signal_real::vvp_fun_signal_real()
void vvp_fun_signal_real::alloc_instance(vvp_context_t context)
{
vvp_set_context_item(context, context_idx, new double);
double*bits = new double;
*bits = 0.0;
vvp_set_context_item(context, context_idx, bits);
}
void vvp_fun_signal_real::reset_instance(vvp_context_t context)