bfgroup / Lyra

A simple to use, composable, command line parser for C++ 11 and beyond
https://bfgroup.github.io/Lyra/
Boost Software License 1.0
483 stars 58 forks source link

SIGSEGV when a command with a nested command is assigned any cardinality after creation #92

Closed mknejp closed 1 month ago

mknejp commented 5 months ago

This only seems to emerge in the following constellation

cli.add_argument(
  lyra::command{"command", ...}
  .cardinality(n, m) // values don't seem to matter
  .add_argument(
     lyra::command{"subcommand", ...});

When invoked with exec command it prints

Program terminated with signal: SIGSEGV