unsafe stack transition

This commit is contained in:
Mark Thom
2019-11-28 21:22:03 -04:00
parent c219d9ad5f
commit 5723edd765
8 changed files with 49 additions and 45 deletions

View File

@@ -608,7 +608,7 @@ impl MachineState {
}
}
TrailRef::Ref(Ref::StackCell(b, sc)) => {
if b <= self.b {
if b < self.b {
self.trail.push(TrailRef::Ref(Ref::StackCell(b, sc)));
self.tr += 1;
}
@@ -693,7 +693,7 @@ impl MachineState {
}
}
TrailRef::Ref(Ref::StackCell(b, _)) => {
if b <= self.b {
if b < self.b {
self.trail[i - offset] = self.trail[i];
} else {
offset += 1;