popt icon indicating copy to clipboard operation
popt copied to clipboard

Non-argument-option have argument in callback.

Open krishna116 opened this issue 2 years ago • 1 comments

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.

krishna116 avatar Jul 20 '22 11:07 krishna116

Thanks, this seems like a bug indeed, we'll have a look.

dmnks avatar Apr 03 '24 08:04 dmnks