Skip to content

Commit

Permalink
Fix index_probe bounds check
Browse files Browse the repository at this point in the history
  • Loading branch information
kivikakk committed Jul 18, 2017
1 parent 625b83d commit 4275216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/remstack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<T> RemStack<T> {
}

fn index_probe(&self, idx: usize) -> Option<usize> {
if idx > self.vec.len() {
if idx >= self.vec.len() {
return None;
}

Expand Down

0 comments on commit 4275216

Please sign in to comment.