mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-08-22 14:53:22 +02:00
Merge pull request #1817 from DarkLordZach/npad-idx-fix
npad: Use NPadIdToIndex to prevent invalid array access
This commit is contained in:
commit
c5ab648554
@ -575,8 +575,8 @@ void Controller_NPad::AddNewControllerAt(NPadControllerType controller, u32 npad
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
connected_controllers[npad_id] = {controller, true};
|
connected_controllers[NPadIdToIndex(npad_id)] = {controller, true};
|
||||||
InitNewlyAddedControler(npad_id);
|
InitNewlyAddedControler(NPadIdToIndex(npad_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Controller_NPad::ConnectNPad(u32 npad_id) {
|
void Controller_NPad::ConnectNPad(u32 npad_id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user