diff options
author | bunnei <bunneidev@gmail.com> | 2018-11-28 23:46:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 23:46:17 +0100 |
commit | c5ab648554520c1828125ea1862831391aee3830 (patch) | |
tree | b3b6d7964fe8a7624e150b6275b9abe3a4efecb7 | |
parent | Merge pull request #1792 from bunnei/dma-pusher (diff) | |
parent | npad: Use NPadIdToIndex to prevent invalid array access (diff) | |
download | yuzu-c5ab648554520c1828125ea1862831391aee3830.tar yuzu-c5ab648554520c1828125ea1862831391aee3830.tar.gz yuzu-c5ab648554520c1828125ea1862831391aee3830.tar.bz2 yuzu-c5ab648554520c1828125ea1862831391aee3830.tar.lz yuzu-c5ab648554520c1828125ea1862831391aee3830.tar.xz yuzu-c5ab648554520c1828125ea1862831391aee3830.tar.zst yuzu-c5ab648554520c1828125ea1862831391aee3830.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 46604887c..a089bf159 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp @@ -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) { |