diff --git a/cli/lightning-cli.c b/cli/lightning-cli.c index fd73ef1d3..524e73f0a 100644 --- a/cli/lightning-cli.c +++ b/cli/lightning-cli.c @@ -145,6 +145,9 @@ static char *opt_set_ordered(enum input *input) static bool is_literal(const char *arg) { size_t arglen = strlen(arg); + if (arglen == 0) { + return false; + } return strspn(arg, "0123456789") == arglen || streq(arg, "true") || streq(arg, "false")