diff --git a/src/benchmark_register.cc b/src/benchmark_register.cc index 1f0dcd1d..ebea2d92 100644 --- a/src/benchmark_register.cc +++ b/src/benchmark_register.cc @@ -150,7 +150,7 @@ bool BenchmarkFamilies::FindBenchmarks( } // reserve in the special case the regex ".", since we know the final // family size. - if (spec == ".") benchmarks->reserve(family_size); + if (spec == ".") benchmarks->reserve(benchmarks->size() + family_size); for (auto const& args : family->args_) { for (int num_threads : *thread_counts) {