From 238343f389a25b0fa8838921fa2074ee9fd5f56b Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Tue, 9 Apr 2024 18:40:08 -0600 Subject: [PATCH] add max_steps to PStr offset (#2381) --- src/machine/system_calls.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) } } } -- 2.54.0