From: Mark Thom Date: Fri, 25 Apr 2025 05:20:40 +0000 (-0700) Subject: correct heap-to-cell-index comparison in copy_slice_to_end (#2906) X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=905ca49753ea614ea0e22b53d3d9a6d699dae362;p=scryer-prolog.git correct heap-to-cell-index comparison in copy_slice_to_end (#2906) --- diff --git a/src/machine/heap.rs b/src/machine/heap.rs index b03d5efa..c12af9d1 100644 --- a/src/machine/heap.rs +++ b/src/machine/heap.rs @@ -870,7 +870,7 @@ impl Heap { unsafe { loop { - if self.free_space() >= len { + if self.free_space() >= heap_index!(len) { ptr::copy_nonoverlapping( self.inner.ptr.add(heap_index!(range.start)), self.inner.ptr.add(self.inner.byte_len),