From 79dd64749622cd08c7087e8170906a030e350824 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 28 Nov 2011 09:48:22 +0000 Subject: Ismail Dönmez: 29920: NO_EXEC problem with arithmetic substitution MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/subst.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Src/subst.c') 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; } -- cgit 1.4.1