From 8fdcfbf621b5e8c1298a89579594db0817adce26 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Tue, 28 Feb 2023 19:37:26 +0100 Subject: Fixed stopping of sub-coroutines. --- include/stc/algo/coroutine.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/stc/algo/coroutine.h b/include/stc/algo/coroutine.h index 40a98836..f3e42165 100644 --- a/include/stc/algo/coroutine.h +++ b/include/stc/algo/coroutine.h @@ -101,7 +101,6 @@ enum { goto _cco_final_ #define cco_stop(ctx) \ - (((ctx)->cco_state = cco_alive(ctx) ? \ - cco_state_final : cco_state_expired), ctx) + (cco_alive(ctx) ? ((ctx)->cco_state = cco_state_final) : 0, ctx) #endif -- cgit v1.2.3