summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/builtin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index ac5a568e8..e7976b51a 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2325,7 +2325,7 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
 	    zerrnam(cname,
 		    "%s: can't create readonly array elements", pname);
 	    return NULL;
-	} else if (on & PM_LOCAL) {
+	} else if ((on & PM_LOCAL) && locallevel) {
 	    *subscript = 0;
 	    pm = (Param) (paramtab == realparamtab ?
 			  gethashnode2(paramtab, pname) :