Don't let trailing empty lines overwrite the result of the last command with 0.
This affects the built-ins eval, fc, and trap and also the string passed to sh with the -c option. Submitted by: Jilles Tjoelker
This commit is contained in:
parent
bb6418cbe3
commit
8403b16a59
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=190698
@ -166,7 +166,8 @@ evalstring(char *s)
|
||||
setstackmark(&smark);
|
||||
setinputstring(s, 1);
|
||||
while ((n = parsecmd(0)) != NEOF) {
|
||||
evaltree(n, 0);
|
||||
if (n != NULL)
|
||||
evaltree(n, 0);
|
||||
popstackmark(&smark);
|
||||
}
|
||||
popfile();
|
||||
|
Loading…
Reference in New Issue
Block a user