about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2016-01-15 15:53:39 +0000
committerPeter Stephenson <pws@zsh.org>2016-01-15 15:53:39 +0000
commit0194b4ab1d0fc6aeae5416edb0122146da9646c9 (patch)
tree13fb01e93c223a3197ea8d46eba00c8d007d1e95 /Src
parent1d8b5285226afba4f1ef9030cf862c14b975c284 (diff)
downloadzsh-0194b4ab1d0fc6aeae5416edb0122146da9646c9.tar.gz
zsh-0194b4ab1d0fc6aeae5416edb0122146da9646c9.tar.xz
zsh-0194b4ab1d0fc6aeae5416edb0122146da9646c9.zip
37646: Return non-zero status from typeset assigning readonly
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index e1a799009..dd20f9eab 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2213,6 +2213,8 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
 				 mkarray(NULL), 0)))
 		return NULL;
 	}
+	if (errflag)
+	    return NULL;
 	pm->node.flags |= (on & PM_READONLY);
 	if (OPT_ISSET(ops,'p'))
 	    paramtab->printnode(&pm->node, PRINT_TYPESET);