diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-11 22:04:24 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-01-11 22:04:24 +0000 |
commit | bfd6782b5a7a75568be3554bbdc7d7eee53e6538 (patch) | |
tree | 75fb9fce21e3897156eed95bb68428a659c711ad /Src/Modules | |
parent | a978d1c47cc8fab586b26b74a3abadbee0da3439 (diff) | |
download | zsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.tar.gz zsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.tar.xz zsh-bfd6782b5a7a75568be3554bbdc7d7eee53e6538.zip |
zsh-workers/9295
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); } } |