From 56b86bf0cd6ce45d337154c133ab361120ee5569 Mon Sep 17 00:00:00 2001 From: wdenk Date: Mon, 12 Apr 2004 14:31:43 +0000 Subject: Fix if / elif handling bug in HUSH shell --- common/hush.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common') diff --git a/common/hush.c b/common/hush.c index 4712adcbf..eeb970cd5 100644 --- a/common/hush.c +++ b/common/hush.c @@ -1843,7 +1843,7 @@ static int run_list_real(struct pipe *pi) if (rmode == RES_THEN || rmode == RES_ELSE) if_code = next_if_code; if (rmode == RES_THEN && if_code) continue; if (rmode == RES_ELSE && !if_code) continue; - if (rmode == RES_ELIF && !if_code) continue; + if (rmode == RES_ELIF && !if_code) break; if (rmode == RES_FOR && pi->num_progs) { if (!list) { /* if no variable values after "in" we skip "for" */ -- cgit v1.2.3