From d247b7f14664f234802bdc2c205ad510e4e400d4 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 14 Jun 2001 09:49:01 +0000 Subject: $* and $@ are special --- Src/builtin.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index ad340afc8..110a264f2 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -1628,7 +1628,14 @@ typeset_single(char *cname, char *pname, Param pm, int func, if ((tc = chflags && chflags != (PM_EFLOAT|PM_FFLOAT))) usepm = 0; } - if (tc){ + + /* + * Extra checks if converting the type of a parameter, or if + * trying to remove readonlyness. It's dangerous doing either + * with a special or a parameter which isn't loaded yet (which + * may be special when it is loaded; we can't tell yet). + */ + if (tc || ((usepm || newspecial) && (off & pm->flags & PM_READONLY))) { if (pm->flags & PM_SPECIAL) { zerrnam(cname, "%s: can't change type of a special parameter", pname, 0); -- cgit 1.4.1