swanctl: Make sure options array passed to getopt_long() ends with a NULL entry

This commit is contained in:
Tobias Brunner
2026-05-19 17:27:33 +02:00
parent a1ad9e39fc
commit 7bdd4bf77b
+2 -2
View File
@@ -62,8 +62,8 @@ static options_t *options;
/**
* Global options used by all subcommands
*/
static struct option command_opts[MAX_COMMANDS > MAX_OPTIONS ?
MAX_COMMANDS : MAX_OPTIONS];
static struct option command_opts[(MAX_COMMANDS > MAX_OPTIONS ?
MAX_COMMANDS : MAX_OPTIONS) + 1];
/**
* Global optstring used by all subcommands