summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-09-28 23:37:23 +0200
committerGitHub <noreply@github.com>2022-09-28 23:37:23 +0200
commit9015a512c275e8d7979715632bf5ae67fe3adf2f (patch)
tree1bf9bb4098fd6533280b314745d9fb329f6ec1ca /src/core/hle/service
parentMerge pull request #8989 from merryhime/loader-nullptr (diff)
parentyuzu: Silence some clang warnings (diff)
downloadyuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.tar
yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.tar.gz
yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.tar.bz2
yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.tar.lz
yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.tar.xz
yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.tar.zst
yuzu-9015a512c275e8d7979715632bf5ae67fe3adf2f.zip
Diffstat (limited to 'src/core/hle/service')
-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];
}