summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorwdenk <wdenk>2004-04-12 14:31:43 +0000
committerwdenk <wdenk>2004-04-12 14:31:43 +0000
commit56b86bf0cd6ce45d337154c133ab361120ee5569 (patch)
treed4038443cceababd417b597df03705f4a6d54fef /common
parentf525c8a1476945b078ce4ffe6cf768c286cbf8cc (diff)
downloadu-boot-imx-56b86bf0cd6ce45d337154c133ab361120ee5569.zip
u-boot-imx-56b86bf0cd6ce45d337154c133ab361120ee5569.tar.gz
u-boot-imx-56b86bf0cd6ce45d337154c133ab361120ee5569.tar.bz2
Fix if / elif handling bug in HUSH shell
Diffstat (limited to 'common')
-rw-r--r--common/hush.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/hush.c b/common/hush.c
index 4712adc..eeb970c 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" */