summaryrefslogtreecommitdiff
path: root/walk.c
diff options
context:
space:
mode:
authorDrazen Borkovic <borkovic@users.noreply.github.com>2017-05-11 19:49:52 -0700
committerToby Goodwin <toby@paccrat.org>2017-05-25 22:23:17 +0100
commit03bfa8b5f639928fa3f003182a51ee263a8dcc91 (patch)
tree43c675ce7d3d11f7c14b27738d2882fd3e828166 /walk.c
parent819db03616d13e2b3da646140d74a4879d46f8c8 (diff)
Fix: "rc -e" exits if condition in while statement returns false the second time
Diffstat (limited to 'walk.c')
-rw-r--r--walk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/walk.c b/walk.c
index 984a68c..67fbb8e 100644
--- a/walk.c
+++ b/walk.c
@@ -110,6 +110,7 @@ top: sigchk();
cond = oldcond;
break;
}
+ cond = oldcond;
if (sigsetjmp(j.j, 1))
break;
jbreak.jb = &j;
@@ -117,12 +118,12 @@ top: sigchk();
do {
Edata block;
block.b = newblock();
- cond = oldcond;
except(eArena, block, &e2);
walk(n->u[1].p, TRUE);
+ cond = TRUE;
testtrue = walk(n->u[0].p, TRUE);
+ cond = oldcond;
unexcept(); /* eArena */
- cond = TRUE;
} while (testtrue);
cond = oldcond;
unexcept(); /* eBreak */