Fix issue when profiling is enabled.
@@ -933,9 +933,8 @@ int yr_scan_verify_match(
#ifdef PROFILING_ENABLED
uint64_t finish_time = yr_stopwatch_elapsed_us(&context->stopwatch);
-
- string->rule->time_cost_per_thread[context->tidx] += (
- finish_time - start_time);
+ YR_RULE* rule = context->rules->rules_list_head[string->rule_idx];
+ rule->time_cost_per_thread[context->tidx] += (finish_time - start_time);
#endif
return result;
