From 2dfa108034563c7542d4b3a7e3eddf7d0af74f23 Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Sun, 8 May 2022 14:52:22 -0600 Subject: [PATCH] unify partial string tail later in create_partial_string (#1462, #1465, #1427) --- src/machine/machine_state_impl.rs | 2 +- src/machine/system_calls.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/machine/machine_state_impl.rs b/src/machine/machine_state_impl.rs index ed235673..a2940ece 100644 --- a/src/machine/machine_state_impl.rs +++ b/src/machine/machine_state_impl.rs @@ -532,8 +532,8 @@ impl MachineState { chars_iter.iter.next(); - self.pdl.push(chars_iter.iter.focus); self.pdl.push(focus); + self.pdl.push(chars_iter.iter.focus); break; } diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index e34b6ccb..6272bcee 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -1460,7 +1460,8 @@ impl Machine { unify!(self.machine_st, self.machine_st.registers[2], pstr_loc_as_cell!(pstr_h)); if !self.machine_st.fail { - self.machine_st.bind(Ref::heap_cell(pstr_h+1), self.machine_st.registers[3]); + let tail = self.machine_st.registers[3]; + unify!(self.machine_st, tail, heap_loc_as_cell!(pstr_h+1)); } } -- 2.54.0