From f3339f0502925e1550cf41158decc6232c3ffc4b Mon Sep 17 00:00:00 2001 From: Devaev Maxim Date: Thu, 12 Sep 2019 03:00:13 +0300 Subject: [PATCH] fixed short options --- src/options.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/options.c b/src/options.c index a812005..cd47969 100644 --- a/src/options.c +++ b/src/options.c @@ -263,10 +263,10 @@ int parse_options(int argc, char *argv[], struct device_t *dev, struct encoder_t if (isalpha(_LONG_OPTS[opt_index].val)) { short_opts[short_index] = _LONG_OPTS[opt_index].val; ++short_index; - } - if (_LONG_OPTS[opt_index].has_arg == required_argument) { - short_opts[short_index] = ':'; - ++short_index; + if (_LONG_OPTS[opt_index].has_arg == required_argument) { + short_opts[short_index] = ':'; + ++short_index; + } } }