diff --git a/src/util-munit.h b/src/util-munit.h index 26b111b..96691fb 100644 --- a/src/util-munit.h +++ b/src/util-munit.h @@ -52,7 +52,7 @@ */ #define foreach_test(t_) \ for (const struct test_function *t_ = &__start_test_functions_section; \ - t_ < &__stop_test_functions_section; \ + t_ < &__stop_test_functions_section && t < &__start_test_functions_section; \ t_++) typedef MunitResult (*munit_test_func_t)(const MunitParameter params[], void *user_data);