diff options
author | jilles <jilles@FreeBSD.org> | 2014-10-12 13:12:06 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2014-10-12 13:12:06 +0000 |
commit | 2791f385b984a34d6a9ec9d1a14314a9d323d57f (patch) | |
tree | 86d62c7b646ab4b4cc272071c412e2e57f905fa0 /bin/sh/eval.c | |
parent | c60e1a8fc3c6e0e955c37437181901f57f1a3727 (diff) | |
download | FreeBSD-src-2791f385b984a34d6a9ec9d1a14314a9d323d57f.zip FreeBSD-src-2791f385b984a34d6a9ec9d1a14314a9d323d57f.tar.gz |
sh: Fix break/continue/return in multiline eval.
Example:
eval $'return\necho bad'
Diffstat (limited to 'bin/sh/eval.c')
-rw-r--r-- | bin/sh/eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c index ea2d264..38e227c 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -168,6 +168,8 @@ evalstring(char *s, int flags) else evaltree(n, flags); any = 1; + if (evalskip) + break; } popstackmark(&smark); setstackmark(&smark); |