[git commit] ash: unbreak PS1 parsing after "ash: parser: Add syntax stack..." commit
Denys Vlasenko
vda.linux at googlemail.com
Wed Apr 4 11:59:53 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=ee1fd1246e7d25990531dbbb2d267605b8914d5d
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/ash.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/shell/ash.c b/shell/ash.c
index ed1a4416c..558601543 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11959,7 +11959,7 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
smallint pssyntax; /* we are expanding a prompt string */
IF_BASH_DOLLAR_SQUOTE(smallint bash_dollar_squote = 0;)
/* syntax stack */
- struct synstack synbase = { .syntax = syntax };
+ struct synstack synbase = { };
struct synstack *synstack = &synbase;
#if ENABLE_ASH_EXPAND_PRMT
@@ -11969,6 +11969,8 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
#else
pssyntax = 0; /* constant */
#endif
+ synstack->syntax = syntax;
+
if (syntax == DQSYNTAX)
synstack->dblquote = 1;
quotef = 0;
More information about the busybox-cvs
mailing list