Uses parsed pattern size in pattern scan

Updates the pattern scan loop to iterate over the size of the parsed pattern, ensuring correct iteration when using parsed patterns.
This commit is contained in:
2025-10-05 14:14:31 +03:00
parent 06f9a8c9ee
commit bd585b5412

View File

@@ -22,7 +22,7 @@ namespace omath
{
bool found = true;
for (std::ptrdiff_t j = 0; j < static_cast<std::ptrdiff_t>(pattern.size()); j++)
for (std::ptrdiff_t j = 0; j < static_cast<std::ptrdiff_t>(parsed_pattern->size()); j++)
{
found = parsed_pattern->at(j) == std::nullopt || parsed_pattern->at(j) == *(range.data() + i + j);