mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-21 06:50:59 +01:00
Fix a bounds check in remove_abandoned (#5024)
This commit is contained in:
1 parent
37755b6985
commit
4400a58470
1 file changed
+1
-1
@@ -88,7 +88,7 @@ impl<A: HalApi, Id: TypedId, T: Resource<Id>> ResourceTracker<Id, T>
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user