summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2018-04-04 13:59:53 +0200
committerDenys Vlasenko2018-04-04 13:59:53 +0200
commitee1fd1246e7d25990531dbbb2d267605b8914d5d (patch)
tree54cb14fe9bd0bebfc0260e1d065eac681d7a865e
parentfbf44854a3b7a32a0a0ff1a03f4163d25f2d62af (diff)
downloadbusybox-ee1fd1246e7d25990531dbbb2d267605b8914d5d.zip
busybox-ee1fd1246e7d25990531dbbb2d267605b8914d5d.tar.gz
ash: unbreak PS1 parsing after "ash: parser: Add syntax stack..." commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index ed1a441..5586015 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;