summaryrefslogtreecommitdiff
path: root/Src/parse.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2019-05-14 12:10:10 +0100
committerPeter Stephenson <p.stephenson@samsung.com>2019-05-14 12:10:10 +0100
commit30e356eb1a599dc634e2b46da272afacd46553de (patch)
tree203442a8875938b27af5932e96ffe13649945b24 /Src/parse.c
parent95211f87ed04fff74475109d36027b5a24a71ab9 (diff)
downloadzsh-30e356eb1a599dc634e2b46da272afacd46553de.tar.gz
zsh-30e356eb1a599dc634e2b46da272afacd46553de.zip
44296: "typeset Q= {X}" crashed the shell.
Diffstat (limited to 'Src/parse.c')
-rw-r--r--Src/parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Src/parse.c b/Src/parse.c
index 22e553a16..27234497b 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -1899,6 +1899,14 @@ par_simple(int *cmplx, int nr)
p += nrediradd;
sr += nrediradd;
}
+ else if (postassigns)
+ {
+ /* C.f. normal case below */
+ postassigns++;
+ ecadd(WCB_ASSIGN(WC_ASSIGN_SCALAR, WC_ASSIGN_INC, 0));
+ ecstr(toksave);
+ ecstr(""); /* TBD can possibly optimise out */
+ }
else
{
ecstr(toksave);