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
@ -166,6 +166,7 @@ evalstring(char *s)
|
||||
setstackmark(&smark);
|
||||
setinputstring(s, 1);
|
||||
while ((n = parsecmd(0)) != NEOF) {
|
||||
if (n != NULL)
|
||||
evaltree(n, 0);
|
||||
popstackmark(&smark);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user