KhronosGroup / KTX-Software

KTX (Khronos Texture) Library and Tools
Other
854 stars 226 forks source link

OptionsSingleInSingleOut does not warn or give error on excess positional parameters #842

Closed MarkCallow closed 7 months ago

MarkCallow commented 7 months ago

With the command ktx foo <options ...> file1 file2 file3 ... where foo uses OptionsSingleInSingleOut, OptionsSingleInSingleOut will use file1 as input, file2 as output and ignore file3. As the last positional parameter is usually the output file sloppy commands could easily lead to unintentional overwrites of file2.

Note that I spotted this in a new command I am developing. Is the command expected to check for excess parameters? I can't find any check in command_encode.