From: Mark Thom Date: Thu, 18 Sep 2025 03:21:54 +0000 (-0700) Subject: push cyclic pstr's tail to iterator stack of printer (#3086) X-Git-Tag: v0.10.0~4 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=7637a0f7d4334089b1cde72e00cad9f64ef4a311;p=scryer-prolog.git push cyclic pstr's tail to iterator stack of printer (#3086) --- diff --git a/src/heap_print.rs b/src/heap_print.rs index 44989fb6..3f5b2564 100644 --- a/src/heap_print.rs +++ b/src/heap_print.rs @@ -893,8 +893,9 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> { return Some(unmark_cell_bits!(next_cell)); } - (HeapCellValueTag::PStrLoc) => { - self.iter.push_stack(h); + (HeapCellValueTag::PStrLoc, l) => { + let tail_idx = self.iter.heap.scan_slice_to_str(l).tail_idx; + self.iter.push_stack(IterStackLoc::marked_loc(tail_idx, HeapOrStackTag::Heap)); return Some(unmark_cell_bits!(next_cell)); } _ => {}