properly iterate over read terms in MachineState::read_term

This commit is contained in:
Mark Thom
2021-12-10 10:10:00 -07:00
parent bcd33dc8e3
commit b24df6e195
3 changed files with 6 additions and 5 deletions

View File

@@ -966,8 +966,9 @@ impl MachineState {
loop {
match self.read(stream, &indices.op_dir) {
Ok(term_write_result) => {
let term = self.store(self.deref(self.registers[2]));
let term = self.registers[2];
unify_fn!(self, heap_loc_as_cell!(term_write_result.heap_loc), term);
let term = heap_loc_as_cell!(term_write_result.heap_loc);
if self.fail {
return Ok(());