diff --git a/rpkg/src/redatamlib/readers/FuzzyVariableParser.cpp b/rpkg/src/redatamlib/readers/FuzzyVariableParser.cpp index 8561c13..18b12fe 100644 --- a/rpkg/src/redatamlib/readers/FuzzyVariableParser.cpp +++ b/rpkg/src/redatamlib/readers/FuzzyVariableParser.cpp @@ -29,6 +29,10 @@ void FuzzyVariableParser::ParseAllVariables(vector &entities) { } size_t numThreads = std::min(entities.size(), maxThreads); + + if (numThreads == 0) { + numThreads = 1; + } size_t chunkSize = entities.size() / numThreads;