mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 11:22:33 -06:00
Merge pull request #9106 from lioncash/copy-err
hid/npad: Fix copy size in GetSupportedNpadIdTypes
This commit is contained in:
commit
efaedcab31
1 changed files with 3 additions and 2 deletions
|
@ -745,8 +745,9 @@ void Controller_NPad::SetSupportedNpadIdTypes(u8* data, std::size_t length) {
|
|||
}
|
||||
|
||||
void Controller_NPad::GetSupportedNpadIdTypes(u32* data, std::size_t max_length) {
|
||||
ASSERT(max_length < supported_npad_id_types.size());
|
||||
std::memcpy(data, supported_npad_id_types.data(), supported_npad_id_types.size());
|
||||
const auto copy_amount = supported_npad_id_types.size() * sizeof(u32);
|
||||
ASSERT(max_length <= copy_amount);
|
||||
std::memcpy(data, supported_npad_id_types.data(), copy_amount);
|
||||
}
|
||||
|
||||
std::size_t Controller_NPad::GetSupportedNpadIdTypesSize() const {
|
||||
|
|
Loading…
Reference in a new issue