]> Repositorios git - scryer-prolog.git/commitdiff
add max_steps to PStr offset (#2381)
authorMark Thom <[email protected]>
Wed, 10 Apr 2024 00:40:08 +0000 (18:40 -0600)
committerMark Thom <[email protected]>
Wed, 10 Apr 2024 00:40:08 +0000 (18:40 -0600)
src/machine/system_calls.rs

index f4dc1f65116d733ae84159abb33e478ea460fd2d..7a3210045c62b95457e6632b59db76e6f6c16ae9 100644 (file)
@@ -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)
                         }
                     }
                 }