aboutsummaryrefslogtreecommitdiff
path: root/lib/cli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cli')
-rw-r--r--lib/cli/optparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cli/optparse.c b/lib/cli/optparse.c
index 25719f0..a89b652 100644
--- a/lib/cli/optparse.c
+++ b/lib/cli/optparse.c
@@ -93,7 +93,7 @@ optparse(optparser_t *st, const cli_opt_t *opts, size_t nopts)
ASSUME(opt.len > opt_no_eq.len);
st->optarg = (u8view_t){
.p = eq_p + 1,
- .len = opt.len - opt_no_eq.len + 1,
+ .len = opt.len - opt_no_eq.len - 1,
};
}
break;
@@ -167,4 +167,4 @@ error_r(optparser_t *st, const char *msg, rune ch)
utf8p() ? u8"%s ā€” ā€˜%.*sā€™" : u8"%s -- `%.*s'",
msg, rtou8(buf, sizeof(buf), ch), buf);
return -1;
-}
+} \ No newline at end of file