diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-11-28 09:48:22 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-11-28 09:48:22 +0000 |
commit | 79dd64749622cd08c7087e8170906a030e350824 (patch) | |
tree | dff7ba743cd39c3601a102a7d77fc48b1cec0cdf | |
parent | ef6bed07421893ef25abf3ad1dff52f6e207e73e (diff) | |
download | zsh-79dd64749622cd08c7087e8170906a030e350824.tar.gz zsh-79dd64749622cd08c7087e8170906a030e350824.tar.xz zsh-79dd64749622cd08c7087e8170906a030e350824.zip |
Ismail Dönmez: 29920: NO_EXEC problem with arithmetic substitution
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/subst.c | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 8ae674ece..72bfe8e0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-28 Peter Stephenson <pws@csr.com> + + * Ismail Dönmez: 29920: Src/Subst.c: error with arithmetic + substitution with NO_EXEC. + 2011-11-25 Peter Stephenson <p.w.stephenson@ntlworld.com> * unposted: Config/version.mk: 4.3.12-test-3. @@ -15618,5 +15623,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5507 $ +* $Revision: 1.5508 $ ***************************************************** diff --git a/Src/subst.c b/Src/subst.c index 66e0bbe77..4e8ed721d 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -247,7 +247,10 @@ stringsubst(LinkList list, LinkNode node, int ssub, int asssub) if (endchar == Outpar && str2[1] == '(' && str[-2] == ')') { /* Math substitution of the form $((...)) */ str[-2] = '\0'; - str = arithsubst(str2 + 2, &str3, str); + if (isset(EXECOPT)) + str = arithsubst(str2 + 2, &str3, str); + else + strncpy(str3, str2, 1); setdata(node, (void *) str3); continue; } |