Commit 6bc71db0 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winebus.sys: Use type and size of the current event, not the previous one.

parent ac6f1764
......@@ -364,8 +364,8 @@ BOOL bus_event_queue_pop(struct list *queue, struct bus_event *event)
tmp = LIST_ENTRY(entry, struct bus_event, entry);
list_remove(entry);
if (event->type != BUS_EVENT_TYPE_INPUT_REPORT) size = sizeof(*event);
else size = offsetof(struct bus_event, input_report.buffer[event->input_report.length]);
if (tmp->type != BUS_EVENT_TYPE_INPUT_REPORT) size = sizeof(*tmp);
else size = offsetof(struct bus_event, input_report.buffer[tmp->input_report.length]);
memcpy(event, tmp, size);
free(tmp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment