summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/module.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 20bb88d88..426bfb1e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2021-11-30 Oliver Kiddle <opk@zsh.org>
+ * 49612: Src/module.c: avoid startup error with clashing non-local
+ module parameter name
+
* 49611 based on 49590 (Martijn Dekker): Src/math.c: disable Inf
and NaN in math expressions for sh emulation
diff --git a/Src/module.c b/Src/module.c
index f41b82f25..bab4d8d73 100644
--- a/Src/module.c
+++ b/Src/module.c
@@ -1039,7 +1039,7 @@ checkaddparam(const char *nam, int opt_i)
* non-autoloadable parameter already there. This
* is consistent with the way add_auto* functions work.
*/
- if (!opt_i || !pm->level) {
+ if (!opt_i || pm->level) {
zwarn("Can't add module parameter `%s': %s",
nam, pm->level ?
"local parameter exists" :