Browse Source

Fix incorrect id check and potential out of bounds lookup

Kelebek1 3 years ago
parent
commit
6839341f17
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/hle/service/nvdrv/core/syncpoint_manager.cpp

+ 1 - 1
src/core/hle/service/nvdrv/core/syncpoint_manager.cpp

@@ -64,7 +64,7 @@ void SyncpointManager::FreeSyncpoint(u32 id) {
 }
 }
 
 
 bool SyncpointManager::IsSyncpointAllocated(u32 id) const {
 bool SyncpointManager::IsSyncpointAllocated(u32 id) const {
-    return (id <= SyncpointCount) && syncpoints[id].reserved;
+    return (id < SyncpointCount) && syncpoints[id].reserved;
 }
 }
 
 
 bool SyncpointManager::HasSyncpointExpired(u32 id, u32 threshold) const {
 bool SyncpointManager::HasSyncpointExpired(u32 id, u32 threshold) const {