Ensure value passed to named event via vpi_put_value() is initialised.

The __vpiNamedEvent::vpi_put_value() function ignores the value, but
intermediate code looks at it.

(cherry picked from commit e2be64558b)
This commit is contained in:
Martin Whitaker 2017-06-15 09:11:11 +01:00
parent 49bea6a01a
commit ce7f28202a
1 changed files with 4 additions and 1 deletions

View File

@ -1110,7 +1110,10 @@ vpiHandle vpi_put_value(vpiHandle obj, s_vpi_value*vp,
vpip_put_value_event*put = new vpip_put_value_event;
put->handle = obj;
if (!dynamic_cast<__vpiNamedEvent*>(obj)) {
if (dynamic_cast<__vpiNamedEvent*>(obj)) {
put->value.format = vpiIntVal;
put->value.value.integer = 0;
} else {
assert(vp);
put->value = *vp;
}