diff --git a/source/regex.c b/source/regex.c index 39d5c95..ece14de 100644 --- a/source/regex.c +++ b/source/regex.c @@ -314,7 +314,7 @@ static int compile_range(const char * const range, static bool catch_(const regex_t * const regex, int * const state) { - for (size_t i = 0; i < regex->catch_table.element_size; i++){ + for (size_t i = 0; i < regex->catch_table.element_count; i++){ const offshoot_t * const offshoot = *(offshoot_t**)vector_get(®ex->catch_table, i); if (offshoot->in == *state) { *state = offshoot->to;