diff --git a/perf/benchmark-set.cc b/perf/benchmark-set.cc index 58884e84e..82266486d 100644 --- a/perf/benchmark-set.cc +++ b/perf/benchmark-set.cc @@ -85,7 +85,7 @@ static void BM_SetLookup(benchmark::State& state) { auto needle = max_value / 2; for (auto _ : state) { benchmark::DoNotOptimize( - hb_set_has (original, needle++)); + hb_set_has (original, needle++ % max_value)); } hb_set_destroy(original);