diff options
| author | Tyge Lovset <[email protected]> | 2023-03-10 07:30:43 +0100 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2023-03-10 07:30:43 +0100 |
| commit | fde6d44c76efdfc8752705122204c38281a844dd (patch) | |
| tree | c283da4c8b0084771c6a69038135de690b242500 /misc | |
| parent | c2338d717937c2649926acf7c10e9dcd23804626 (diff) | |
| download | STC-modified-fde6d44c76efdfc8752705122204c38281a844dd.tar.gz STC-modified-fde6d44c76efdfc8752705122204c38281a844dd.zip | |
Rename cco_alive() => cco_suspended(). Replaced cco_done() with cco_alive().
Diffstat (limited to 'misc')
| -rw-r--r-- | misc/examples/generator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/examples/generator.c b/misc/examples/generator.c index f83ff3f2..2bccc489 100644 --- a/misc/examples/generator.c +++ b/misc/examples/generator.c @@ -20,8 +20,8 @@ bool Triple_next(Triple_iter* it) { for (t->a = 1; t->a < t->c; ++t->a) { for (t->b = t->a; t->b < t->c; ++t->b) { if (t->a*t->a + t->b*t->b == t->c*t->c) { + if (t->n-- == 0) cco_return; cco_yield(true); - if (t->n-- == 1) cco_return; } } } |
