March 19, 2026
11:18 a.m.
Rémi Bernon (@rbernon) commented about dlls/dinput/tests/driver_bus.c:
for (i = 0; i < impl->devices->Count; ++i) if (impl->devices->Objects[i] == device) break; if (i == impl->devices->Count) status = STATUS_NOT_FOUND; - else impl->devices->Objects[i] = impl->devices->Objects[impl->devices->Count--]; + else impl->devices->Objects[i] = impl->devices->Objects[--impl->devices->Count]; + if (status != STATUS_NOT_FOUND) impl->devices->Objects[impl->devices->Count + 1] = NULL;
Do we really need to set it to NULL? If that's not the case already I think we should use device count everywhere and not rely on NULL pointers. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10364#note_132758