From 3aa8a04f4fe38d828006b4713beb390ef526cea7 Mon Sep 17 00:00:00 2001 From: Tyge Lovset Date: Wed, 21 Jun 2023 00:31:59 +0200 Subject: Added cco_switch(x) {}, cco_case(val) {}, and cco_default {} to use inside coroutines. --- misc/examples/regex2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'misc/examples') diff --git a/misc/examples/regex2.c b/misc/examples/regex2.c index 5718a1d8..734190cb 100644 --- a/misc/examples/regex2.c +++ b/misc/examples/regex2.c @@ -26,7 +26,7 @@ int main() printf("\ninput: %s\n", s[i].input); c_formatch (j, &re, s[i].input) { - c_forrange (k, cregex_captures(&re)) + c_forrange (k, cregex_captures(&re) + 1) printf(" submatch %lld: %.*s\n", k, c_SV(j.match[k])); } } -- cgit v1.2.3