mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-06-11 11:53:47 -04:00
GetIndexFromAruid returns AruidIndexMax as the “not found” value, but both GetControllerFromNpadIdType overloads were using that value to index controller_data without checking it first. when a game routes through DisconnectNpad before its applet resource is registered, we can end up indexing past the end of controller_data. That seems to be what was crashing some games on launch, especially on macOS and Android, where the out-of-bounds read is less likely to just slide by unnoticed. So yeah, AruidIndexMax is a sentinel, not a real controller_data index, so we should not treat it like one. Fixes: https://github.com/eden-emulator/Issue-Reports/issues/438 Fixes: https://github.com/eden-emulator/Issue-Reports/issues/439 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4064 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> |
||
|---|---|---|
| .. | ||
| frontend | ||
| hidbus | ||
| irsensor | ||
| resources | ||
| CMakeLists.txt | ||
| hid_core.cpp | ||
| hid_core.h | ||
| hid_result.h | ||
| hid_types.h | ||
| hid_util.h | ||
| resource_manager.cpp | ||
| resource_manager.h | ||