From 8763a42c98b2b16e9cbb649cc16e093382c3444f Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Tue, 29 Apr 2025 22:48:13 +0200 Subject: [PATCH] FIXED: arg/3 for partial strings This address #2924, reported by @haijinSk. Thank you a lot! Example: ?- arg(2, "a", A). A = []. The fact that such a mistake in macro usage is even possible could be a sign that the macro definition should be stricter. --- src/machine/machine_state_impl.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/machine_state_impl.rs b/src/machine/machine_state_impl.rs index ede17fa6..baa25394 100644 --- a/src/machine/machine_state_impl.rs +++ b/src/machine/machine_state_impl.rs @@ -934,7 +934,7 @@ impl MachineState { unify_fn!(*self, pstr_loc_as_cell!(pstr_loc + c.len_utf8()), a3); } else { let tail_idx = Heap::pstr_tail_idx(pstr_loc); - unify_fn!(*self, self.heap[tail_idx]); + unify_fn!(*self, self.heap[tail_idx], a3); } /* -- 2.54.0