fixed segfault if last lv pair had no value
This commit is contained in:
parent
41d8dbbde5
commit
01a42d6656
@ -25,7 +25,7 @@ carg_parse_data* carg_parse(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
lv_labels[lv_cp] = argv[i] + 1;
|
lv_labels[lv_cp] = argv[i] + 1;
|
||||||
|
|
||||||
if (argc >= i + 1 && argv[i + 1][0] != '-')
|
if (argc > i + 1 && argv[i + 1][0] != '-')
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user