From e3432e87c30a7d91d5c866bfcc3fbb4c6a6da335 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Tue, 9 Jan 2024 13:49:10 +0100 Subject: [PATCH] Fix a bounds check in remove_abandoned --- 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 b33905f512..6795890cc6 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; }