about summary refs log tree commit diff
path: root/Src/Modules/parameter.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules/parameter.c')
-rw-r--r--Src/Modules/parameter.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index 34a418623..6e19a377e 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -794,7 +794,14 @@ getpmoption(HashTable ht, char *name)
     pm->level = 0;
 
     if ((n = optlookup(name)))
-	pm->u.str = dupstring(opts[n] ? "on" : "off");
+    {
+	int ison;
+	if (n > 0)
+	    ison = opts[n];
+	else
+	    ison = !opts[-n];
+	pm->u.str = dupstring(ison ? "on" : "off");
+    }
     else {
 	pm->u.str = dupstring("");
 	pm->flags |= PM_UNSET;