Fix bitmask check for event IDs > 32 in Ctrl::SyncpointFreeEventBatch

Doing 1 << 32 would result in an integer overflow rather than the desired behaviour of checking a bit, make 1 64 bit to present that.
This commit is contained in:
Billy Laws 2021-10-29 18:31:50 +01:00 committed by PixelyIon
parent debab7c9c7
commit 34bf413661

View File

@ -225,7 +225,7 @@ namespace skyline::service::nvdrv::device::nvhost {
std::lock_guard lock(syncpointEventMutex); std::lock_guard lock(syncpointEventMutex);
for (u32 i{}; i < std::numeric_limits<u64>::digits; i++) for (u32 i{}; i < std::numeric_limits<u64>::digits; i++)
if (bitmask & (1 << i)) if (bitmask & (1ULL << i))
if (auto freeErr{SyncpointFreeEventLocked(i)}; freeErr != PosixResult::Success) if (auto freeErr{SyncpointFreeEventLocked(i)}; freeErr != PosixResult::Success)
err = freeErr; err = freeErr;