fixed segfault if last lv pair had no value

This commit is contained in:
AUnicornWithNoLife 2023-05-11 18:15:21 +01:00
parent 41d8dbbde5
commit 01a42d6656

View File

@ -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++;