[ares][stack] fix in_frame test polarity (thanks to @philipcmonk)

This commit is contained in:
Edward Amsden 2023-02-21 22:43:46 -06:00
parent b03f398a69
commit e79781c892

View File

@ -113,10 +113,10 @@ impl NockStack {
let ptr_u64 = ptr as *const u64;
match &self.polarity {
Polarity::East => {
ptr_u64 >= self.frame_pointer && ptr_u64 < self.stack_pointer
ptr_u64 >= self.stack_pointer && ptr_u64 < self.frame_pointer
},
Polarity::West => {
ptr_u64 >= self.stack_pointer && ptr_u64 < self.frame_pointer
ptr_u64 >= self.frame_pointer && ptr_u64 < self.stack_pointer
},
}
}