buttplugio / buttplug-rs-ffi

FFI from buttplug-rs to Java and other languages
Other
88 stars 22 forks source link

JS ButtplugClientDevice equality testing doesn't work #81

Closed qdot closed 3 years ago

qdot commented 3 years ago

Describe the bug

  1. Store a JS ButtplugClientDevice in an array
  2. On a deviceremoved event, try removing that device from the array using FindIndex to get the array index.

Expected behavior Index should be >= 0

Actual behavior Index is -1

Additional context Equality here is weird due to the pointer ownership issues. We should just test for client device index equality if possible.

qdot commented 3 years ago

This was me using findIndex incorrectly :P