Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic with wooting_analog_get_connected_devices_info #85

Closed
wants to merge 1 commit into from

Conversation

Sainan
Copy link
Contributor

@Sainan Sainan commented Oct 25, 2024

There seems to have been an instance where swap_with_slice panicked because c_devices.len() was 0 for some reason when using the example C plugin.

I'm no Rust expert, but this logic seems to be working to correctly map devices into c_devices. Tested with various plugins.

There seems to have been an instance where swap_with_slice panicked because `c_devices.len()` was `0` for some reason.
I'm no Rust expert, but this logic seems to be working to correctly map devices into c_devices.
@simon-wh
Copy link
Member

I'm a little confused, as the before and after code should functionally behave very similarly. In what scenario were you able to trigger the panic? Like is it very reproducible where you can say definitively that this change prevents it?

@Sainan Sainan closed this Oct 29, 2024
@Sainan Sainan deleted the fix-devinfo-panic branch October 29, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants