Fixes early parsing of trailing -v/-loglevel while using '-' to output to stdout.
Unified · Split
| @@ -492,8 +492,9 @@ int locate_option(int argc, char **argv, const OptionDef *options, · 491 unmodified lines | ||
| 492 | 492 | for (i = 1; i < argc; i++) { |
| 493 | 493 | const char *cur_opt = argv[i]; |
| 494 | 494 | |
| 495 | − if (*cur_opt++ != '-') | |
| 495 | + if (!(cur_opt[0] == '-' && cur_opt[1])) | |
| 496 | 496 | continue; |
| 497 | + cur_opt++; | |
| 497 | 498 | |
| 498 | 499 | po = find_option(options, cur_opt); |
| 499 | 500 | if (!po->name && cur_opt[0] == 'n' && cur_opt[1] == 'o') |