Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51831 Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/winebus.sys/unixlib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/winebus.sys/unixlib.c b/dlls/winebus.sys/unixlib.c index 49a42ea04ad..be030255705 100644 --- a/dlls/winebus.sys/unixlib.c +++ b/dlls/winebus.sys/unixlib.c @@ -350,8 +350,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);