From 01a42d665640712f96cdaa75b9bd672b8d2510e3 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife <55228370+AUnicornWithNoLife@users.noreply.github.com> Date: Thu, 11 May 2023 18:15:21 +0100 Subject: [PATCH] fixed segfault if last lv pair had no value --- carg-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/carg-parse.c b/carg-parse.c index a2946e3..c4fec06 100644 --- a/carg-parse.c +++ b/carg-parse.c @@ -25,7 +25,7 @@ carg_parse_data* carg_parse(int argc, char** argv) { lv_labels[lv_cp] = argv[i] + 1; - if (argc >= i + 1 && argv[i + 1][0] != '-') + if (argc > i + 1 && argv[i + 1][0] != '-') { i++;