tighten deallocate truncation of stack
@@ -2784,8 +2784,11 @@ pub fn deallocate(&mut self) {
self.cp = frame.prelude.cp;
self.e = frame.prelude.e;
- if e > self.b {
- self.stack.truncate(e);
+ if self.e > self.b {
+ let frame = self.stack.index_and_frame(self.e);
+ let size = AndFrame::size_of(frame.prelude.univ_prelude.num_cells);
+
+ self.stack.truncate(self.e + size);
}
self.p += 1;
