diff options
Diffstat (limited to 'Src/Modules')
-rw-r--r-- | Src/Modules/parameter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c index 23097e10c..94aff0c18 100644 --- a/Src/Modules/parameter.c +++ b/Src/Modules/parameter.c @@ -838,8 +838,10 @@ scanpmoptions(HashTable ht, ScanFunc func, int flags) for (i = 0; i < optiontab->hsize; i++) for (hn = optiontab->nodes[i]; hn; hn = hn->next) { + int optno = ((Optname) hn)->optno, ison; pm.nam = hn->nam; - pm.u.str = dupstring(opts[((Optname) hn)->optno] ? "on" : "off"); + ison = optno < 0 ? !opts[-optno] : opts[optno]; + pm.u.str = dupstring(ison ? "on" : "off"); func((HashNode) &pm, flags); } } |