Skip to content

Commit

Permalink
Fix a bounds check in remove_abandoned (#5024)
Browse files Browse the repository at this point in the history
  • Loading branch information
nical authored Jan 9, 2024
1 parent 37755b6 commit 4400a58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wgpu-core/src/track/stateless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 4400a58

Please sign in to comment.