popt
popt copied to clipboard
Non-argument-option have argument in callback.
using popt version: mingw-w64-x86_64-popt 1.18-1 using build system: MSYS2
In the attached code (test.zip), option type is "POPT_ARG_NONE" for the option "help", but when I print information in the callback, this option has argument print out.
How to reproduce the issue. 1, build and run the test application.
cmake -S . -B build
cmake --build build
./build/test.exe --type pdf --file sample.pdf --help
2, this is the test application output. The line 3 is the option "help", the argument exist.
[callback] option = type, arg = pdf, data = (null)
[callback] option = file, arg = sample.pdf, data = (null)
[callback] option = help, arg = sample.pdf, data = (null)
help = 1
type = pdf
file = sample.pdf
count = 0
Thanks.
Thanks, this seems like a bug indeed, we'll have a look.