about summary refs log tree commit diff
path: root/Src/subst.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/subst.c')
-rw-r--r--Src/subst.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Src/subst.c b/Src/subst.c
index 5b08d0bfb..b0bb885c9 100644
--- a/Src/subst.c
+++ b/Src/subst.c
@@ -152,8 +152,7 @@ stringsubst(LinkList list, LinkNode node, int ssub)
 	    *str++ = '\0';
 	    if (endchar == Outpar && str2[1] == '(' && str[-2] == ')') {
 		/* Math substitution of the form $((...)) */
-		str[-2] = '\0';
-		str = arithsubst(str2 + 2, &str3, str);
+		str = arithsubst(str2 + 1, &str3, str);
 		setdata(node, (void *) str3);
 		continue;
 	    }