From 9418531f0c8304669027a63495d4e1f079b9c0e6 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 3 Feb 2023 11:47:20 +0000 Subject: Reset the in-order event index when clearing the event array --- gusb/gusb-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gusb/gusb-device.c b/gusb/gusb-device.c index bbda96c..c44079d 100644 --- a/gusb/gusb-device.c +++ b/gusb/gusb-device.c @@ -1170,6 +1170,7 @@ g_usb_device_clear_events(GUsbDevice *self) { GUsbDevicePrivate *priv = GET_PRIVATE(self); g_return_if_fail(G_USB_IS_DEVICE(self)); + priv->event_idx = 0; g_ptr_array_set_size(priv->events, 0); } -- cgit v1.2.1