Skip to content
  • Juhani Krekelä's avatar
    Fix getopt_long(3) handling of required argument at the end of argv. · 610b51ff
    Juhani Krekelä authored
    Previously if argv ended with a long option that required an argument
    followed by said argument, getopt_long(3) would generate an error saying
    that the option requires an argument even though it was provided. This
    was because the comparison of optind against argc did not account for
    the fact that optind had already been incremented, causing an
    off-by-one.
    610b51ff