about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2016-02-16 18:18:39 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2016-02-17 20:04:25 -0800
commitb7b3ae311db08cc2fc8cda52ac3a1ac8e06d2a89 (patch)
tree83df1807539793554bfa88af0e495a79b027ce23 /Src
parentab74c86edb30fa04fda5fe7fa01e404334f7c2b0 (diff)
downloadzsh-b7b3ae311db08cc2fc8cda52ac3a1ac8e06d2a89.tar.gz
zsh-b7b3ae311db08cc2fc8cda52ac3a1ac8e06d2a89.tar.xz
zsh-b7b3ae311db08cc2fc8cda52ac3a1ac8e06d2a89.zip
37988: $0 becomes read-only under POSIXARGZERO
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c
index 0233e2b00..8bd8a8eee 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -4158,7 +4158,9 @@ static void
 argzerosetfn(UNUSED(Param pm), char *x)
 {
     if (x) {
-	if (!isset(POSIXARGZERO)) {
+	if (isset(POSIXARGZERO))
+	    zerr("read-only variable: 0");
+	else {
 	    zsfree(argzero);
 	    argzero = ztrdup(x);
 	}