diff --git a/ParallelSearch.hpp b/ParallelSearch.hpp index f13939b..9e73edb 100644 --- a/ParallelSearch.hpp +++ b/ParallelSearch.hpp @@ -27,7 +27,7 @@ public: // compute [first; last( iterators for sub-range std::size_t size = bucketSize + remains; Iterator first = begin + offset; - Iterator last = first + size; + Iterator last = begin + offset + size; // add appropriate search job jobList_.push_back(SearchJob(first, last, pattern));