Skip to content

Commit 69c7b6a

Browse files
committed
Fix: Prefix length in parallel counting of short needles
1 parent 3ee1676 commit 69c7b6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/stringcuzilla/find_many.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ struct find_many<state_id_type_, allocator_type_, sz_caps_sp_k, enable_> {
959959

960960
// We may have a case of a thread receiving no data at all
961961
byte_t const *optimal_start = std::min(haystack_data + core_index * bytes_per_core_optimal, haystack_end);
962-
byte_t const *const prefix_end = std::min(optimal_start + max_needle_length - 1, haystack_end);
962+
byte_t const *const prefix_end = std::min(optimal_start + max_needle_length, haystack_end);
963963
byte_t const *const overlapping_end =
964964
std::min(optimal_start + bytes_per_core_optimal + max_needle_length, haystack_end);
965965

0 commit comments

Comments
 (0)