From 4400a5847080d1164bdca93a90622414963ed9f3 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 9 Jan 2024 17:24:18 +0100 Subject: [PATCH] Fix a bounds check in remove_abandoned (#5024) --- wgpu-core/src/track/stateless.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wgpu-core/src/track/stateless.rs b/wgpu-core/src/track/stateless.rs index b33905f51..6795890cc 100644 --- a/wgpu-core/src/track/stateless.rs +++ b/wgpu-core/src/track/stateless.rs @@ -88,7 +88,7 @@ impl> ResourceTracker fn remove_abandoned(&mut self, id: Id) -> bool { let index = id.unzip().0 as usize; - if index > self.metadata.size() { + if index >= self.metadata.size() { return false; }