Skip to content

Commit

Permalink
fix allocation amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-o-how committed Feb 7, 2025
1 parent cbd3d01 commit 824644f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ impl Allocator {

pub fn new_pair(&mut self, first: NodePtr, rest: NodePtr) -> Result<NodePtr, EvalErr> {
let idx = self.pair_vec.len();
if idx > MAX_NUM_PAIRS - self.num_ghost_pairs {
if idx >= MAX_NUM_PAIRS - self.num_ghost_pairs {
return err(self.nil(), "too many pairs");
}
self.pair_vec.push(IntPair { first, rest });
Expand Down

0 comments on commit 824644f

Please sign in to comment.