diff options
| author | Toby Goodwin <toby@paccrat.org> | 2017-08-25 20:46:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-25 20:46:09 +0100 |
| commit | 7dc3033c862c30d8998ed3e4c98c056286f31401 (patch) | |
| tree | 31cd67d547bdf7c9a63fae03a34b0dd6d8bdd538 /except.c | |
| parent | 1952b154af8f2afedbdb4b58bd1c6d9099b39973 (diff) | |
| parent | eb594861d41090b53272a6bc8941bf2075c4311f (diff) | |
Merge pull request #21 from muennich/break-varstack
Fix breaking out of loops through local variable blocks
Diffstat (limited to 'except.c')
| -rw-r--r-- | except.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -66,7 +66,7 @@ extern void rc_raise(ecodes e) { exit(1); /* child processes exit on an error/signal */ for (; estack != NULL; estack = estack->prev) if (estack->e != e) { - if (e == eBreak && estack->e != eArena) + if (e == eBreak && estack->e != eArena && estack->e != eVarstack) rc_error("break outside of loop"); else if (e == eReturn && estack->e == eError) /* can return from loops inside functions */ rc_error("return outside of function"); |