zsh/zsh-4.3.12-ksh-emulation-syntax-checking.patch

16 lines
553 B
Diff

diff -ruN zsh-4.3.12-orig/Src/subst.c zsh-4.3.12/Src/subst.c
--- zsh-4.3.12-orig/Src/subst.c 2011-05-23 18:48:19.000000000 +0200
+++ zsh-4.3.12/Src/subst.c 2011-06-29 13:44:13.000000000 +0200
@@ -245,7 +245,10 @@
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;
}