2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #1817 from DarkLordZach/npad-idx-fix

npad: Use NPadIdToIndex to prevent invalid array access
This commit is contained in:
bunnei 2018-11-28 17:46:17 -05:00 committed by GitHub
commit c5ab648554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -575,8 +575,8 @@ void Controller_NPad::AddNewControllerAt(NPadControllerType controller, u32 npad
return;
}
connected_controllers[npad_id] = {controller, true};
InitNewlyAddedControler(npad_id);
connected_controllers[NPadIdToIndex(npad_id)] = {controller, true};
InitNewlyAddedControler(NPadIdToIndex(npad_id));
}
void Controller_NPad::ConnectNPad(u32 npad_id) {