From 6839341f17326ad932565e7c1a5a07e3d3020da2 Mon Sep 17 00:00:00 2001
From: Kelebek1 <eeeedddccc@hotmail.co.uk>
Date: Wed, 31 May 2023 19:10:00 +0100
Subject: [PATCH] Fix incorrect id check and potential out of bounds lookup

---
 src/core/hle/service/nvdrv/core/syncpoint_manager.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
index aba51d280..c4c4c2593 100644
--- a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
+++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp
@@ -64,7 +64,7 @@ void SyncpointManager::FreeSyncpoint(u32 id) {
 }
 
 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 {