From eb08892dcfa6d0b5a22532ae37f9ed52f478b68e Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Sat, 27 Jun 2015 21:19:01 +0100
Subject: 35635: a bit more consistency about making elements local
---
ChangeLog | 3 +++
Src/builtin.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index cf53b217e..7e06cb471 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
2015-06-27 Peter Stephenson
+ * 35635: Src/builtin.c: a bit more consistency about
+ making elements of things local.
+
* users/20281: Completion/Base/Core/_main_complete:
don't require MULTIFUNCDEF as _main_complete is parsed
before we can ensure it's set.
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) :
--
cgit 1.4.1