diff --git a/src/emu/emu_ev.c b/src/emu/emu_ev.c index 77e3a76..05af80e 100644 --- a/src/emu/emu_ev.c +++ b/src/emu/emu_ev.c @@ -7,8 +7,6 @@ void emu_ev(struct emu_ev *ev, const struct ovni_ev *oev, int64_t sclock, int64_t dclock) { - memset(ev, 0, sizeof(struct emu_ev)); - ev->mcv[0] = ev->m = oev->header.model; ev->mcv[1] = ev->c = oev->header.category; ev->mcv[2] = ev->v = oev->header.value; @@ -27,5 +25,9 @@ emu_ev(struct emu_ev *ev, const struct ovni_ev *oev, if (oev->header.flags & OVNI_EV_JUMBO) { ev->is_jumbo = 1; } + } else { + ev->has_payload = 0; + ev->payload = NULL; + ev->is_jumbo = 0; } }