aboutsummaryrefslogtreecommitdiffstats
path: root/parseconfig.c
diff options
context:
space:
mode:
authorkraxel <kraxel>2004-06-10 07:31:54 +0000
committerkraxel <kraxel>2004-06-10 07:31:54 +0000
commit786cf865080ac907b75fbe74ead290fff9efb718 (patch)
treef90ea8aaeb3d92033a2857daad3a8b43480b92b3 /parseconfig.c
parentdf64c4705b9447645eaf3e7afb053fe47c2997e1 (diff)
downloadfbida-786cf865080ac907b75fbe74ead290fff9efb718.tar.gz
- fix command line parsing.
Diffstat (limited to 'parseconfig.c')
-rw-r--r--parseconfig.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parseconfig.c b/parseconfig.c
index e7a0e0a..60847c3 100644
--- a/parseconfig.c
+++ b/parseconfig.c
@@ -373,7 +373,8 @@ cfg_parse_cmdline(int *argc, char **argv, struct cfg_cmdline *opt)
1);
shift = 1;
- } else if (opt[o].needsarg && sopt && sopt == opt[o].letter) {
+ } else if (opt[o].needsarg && sopt && sopt == opt[o].letter &&
+ i+1 < *argc) {
/* arg: -f bar */
cfg_set_str(opt[o].option.domain,
opt[o].option.section,