Skip to content

Commit

Permalink
add max_steps to PStr offset (#2381)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthom committed Apr 10, 2024
1 parent 77e90ca commit 238343f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/machine/system_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit 238343f

Please sign in to comment.