From: Mark Thom Date: Wed, 10 Apr 2024 00:40:08 +0000 (-0600) Subject: add max_steps to PStr offset (#2381) X-Git-Tag: v0.10.0~142 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=238343f389a25b0fa8838921fa2074ee9fd5f56b;p=scryer-prolog.git add max_steps to PStr offset (#2381) --- diff --git a/src/machine/system_calls.rs b/src/machine/system_calls.rs index f4dc1f65..7a321004 100644 --- a/src/machine/system_calls.rs +++ b/src/machine/system_calls.rs @@ -433,7 +433,8 @@ impl BrentAlgState { return if pstr_chars < max_steps { CycleSearchResult::ProperList(pstr_chars + 1) } else { - CycleSearchResult::PStrLocation(max_steps, h_offset, n) + let offset = max_steps as usize + n; + CycleSearchResult::PStrLocation(max_steps, h_offset, offset) } } }