summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2022-09-21 18:51:31 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2022-09-21 18:51:31 +0200
commit5a74ced59a159c374071028d431fbf877c819b22 (patch)
treed8b72d36eb80267e294b27abd872d843a8c30b6d /src/core/hle/service/hid
parentMerge pull request #8849 from Morph1984/parallel-astc (diff)
downloadyuzu-5a74ced59a159c374071028d431fbf877c819b22.tar
yuzu-5a74ced59a159c374071028d431fbf877c819b22.tar.gz
yuzu-5a74ced59a159c374071028d431fbf877c819b22.tar.bz2
yuzu-5a74ced59a159c374071028d431fbf877c819b22.tar.lz
yuzu-5a74ced59a159c374071028d431fbf877c819b22.tar.xz
yuzu-5a74ced59a159c374071028d431fbf877c819b22.tar.zst
yuzu-5a74ced59a159c374071028d431fbf877c819b22.zip
Diffstat (limited to 'src/core/hle/service/hid')
-rw-r--r--src/core/hle/service/hid/irs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/irs.cpp b/src/core/hle/service/hid/irs.cpp
index c4b44cbf9..6a3453457 100644
--- a/src/core/hle/service/hid/irs.cpp
+++ b/src/core/hle/service/hid/irs.cpp
@@ -542,7 +542,8 @@ Result IRS::IsIrCameraHandleValid(const Core::IrSensor::IrCameraHandle& camera_h
Core::IrSensor::DeviceFormat& IRS::GetIrCameraSharedMemoryDeviceEntry(
const Core::IrSensor::IrCameraHandle& camera_handle) {
- ASSERT_MSG(sizeof(StatusManager::device) > camera_handle.npad_id, "invalid npad_id");
+ const auto npad_id_max_index = static_cast<u8>(sizeof(StatusManager::device));
+ ASSERT_MSG(camera_handle.npad_id < npad_id_max_index, "invalid npad_id");
return shared_memory->device[camera_handle.npad_id];
}