From 88c124f4bcadbcbf1ee6fa4de539c0bc42f46dd6 Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Mon, 20 Jun 2022 12:49:17 -0500 Subject: [PATCH] Properly obtain the next option value --- src/gargoyle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gargoyle.c b/src/gargoyle.c index 2147a4a..2e5e26f 100644 --- a/src/gargoyle.c +++ b/src/gargoyle.c @@ -33,9 +33,9 @@ uint8_t gargoyle_digest_args(uint16_t optc, struct gargoyle_opt *optv, int *argc if(opt->type & GARGOYLE_TYPE_BOOL) { res = gargoyle_from_bool(opt, brand); } else if(*(brand + opt->brand_sz) == '=') { - res = gargoyle_from_rope(opt, brand + opt->brand_sz); + res = gargoyle_from_rope(opt, brand + opt->brand_sz + 1); } else { - if(!(*argv + 1)) { + if(!*(*argv + 1)) { return GARGOYLE_ERR_VALUE_REQUIRED; }