summaryrefslogtreecommitdiff
path: root/Src/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index da453000c..3b82c9e7f 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -2266,6 +2266,10 @@ typeset_single(char *cname, char *pname, Param pm, UNUSED(int func),
zerrnam(cname, "%s: restricted", pname);
return pm;
}
+ if (pm->node.flags & PM_SINGLE) {
+ zerrnam(cname, "%s: can only have a single instance", pname);
+ return pm;
+ }
/*
* For specials, we keep the same struct but zero everything.
* Maybe it would be easier to create a new struct but copy