From 12fd5d0065f64f0fae54d335624b4cb10e2832b9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 22 Jun 2000 20:57:14 +0000 Subject: 12040: typeset -r bug --- Src/builtin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index 8ea88862f..90c82c06e 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1622,7 +1622,7 @@ typeset_single(char *cname, char *pname, Param pm, int func, arrfixenv(pm->nam, x); } } - pm->flags = (pm->flags | on) & ~(off | PM_UNSET); + pm->flags = (pm->flags | (on & ~PM_READONLY)) & ~(off | PM_UNSET); /* This auxlen/pm->ct stuff is a nasty hack. */ if ((on & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z | PM_INTEGER | PM_EFLOAT | PM_FFLOAT)) && @@ -1643,6 +1643,7 @@ typeset_single(char *cname, char *pname, Param pm, int func, zwarnnam(cname, "can't assign new value for array %s", pname, 0); return NULL; } + pm->flags |= (on & PM_READONLY); return pm; } -- cgit 1.4.1