diff options
| author | Tyge Løvset <[email protected]> | 2020-03-31 22:29:26 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-03-31 22:29:26 +0200 |
| commit | 5de09241cd4b79821cc5e1df5d0ff7b45e265ab5 (patch) | |
| tree | 827733cc047708e95e461623ca65d1ebf379e5c9 | |
| parent | d19990bed1bd27d5c43f259723585e50b70df6a6 (diff) | |
| download | STC-modified-5de09241cd4b79821cc5e1df5d0ff7b45e265ab5.tar.gz STC-modified-5de09241cd4b79821cc5e1df5d0ff7b45e265ab5.zip | |
Update copt.h
| -rw-r--r-- | ccl/copt.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -113,7 +113,8 @@ static int copt_getopt(copt_t *opt, int argc, char *argv[], if (o->has_arg != copt_no_argument) {
if (argv[opt->_i][j] == '=')
opt->arg = &argv[opt->_i][j + 1];
- else if (argv[opt->_i][j] == '\0' && opt->_i < argc - 1 && (o->has_arg == copt_required_argument || argv[opt->_i + 1][0] != '-'))
+ else if (argv[opt->_i][j] == '\0' && opt->_i < argc - 1 && (o->has_arg == copt_required_argument ||
+ argv[opt->_i + 1][0] != '-'))
opt->arg = argv[++opt->_i];
else if (o->has_arg == copt_required_argument)
optc = ':'; // missing option argument
|
