diff options
Diffstat (limited to 'Src/Modules')
-rw-r--r-- | Src/Modules/param_private.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/Modules/param_private.c b/Src/Modules/param_private.c index 86416c5c5..24545819d 100644 --- a/Src/Modules/param_private.c +++ b/Src/Modules/param_private.c @@ -171,6 +171,7 @@ bin_private(char *nam, char **args, LinkList assigns, Options ops, int func) { int from_typeset = 1; int ofake = fakelevel; /* paranoia in case of recursive call */ + int hasargs = *args != NULL || (assigns && firstnode(assigns)); makeprivate_error = 0; if (!OPT_ISSET(ops, 'P')) { @@ -190,6 +191,9 @@ bin_private(char *nam, char **args, LinkList assigns, Options ops, int func) } ops->ind['g'] = 2; /* force bin_typeset() to behave as "local" */ + if (OPT_ISSET(ops, 'p') || (!hasargs && OPT_ISSET(ops, '+'))) { + return bin_typeset("private", args, assigns, ops, func); + } queue_signals(); fakelevel = locallevel; |