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:
parent
55a15d604d
commit
716853699f
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue