diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-10-30 08:28:15 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-10-30 08:28:15 +0100 |
commit | 045f4bb5b1767140c4f6cfe2d2002553925c4205 (patch) | |
tree | f51b2034e91a3f67d2bde506cf84d13cfc496c6e /lib/cli | |
parent | 5dbf53a1c512f9163744874e3d502e9f9e2808da (diff) |
Make string view lengths signed
Diffstat (limited to 'lib/cli')
-rw-r--r-- | lib/cli/optparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cli/optparse.c b/lib/cli/optparse.c index f4034a9..25719f0 100644 --- a/lib/cli/optparse.c +++ b/lib/cli/optparse.c @@ -52,7 +52,7 @@ optparse(optparser_t *st, const cli_opt_t *opts, size_t nopts) const char8_t *eq_p = u8chr(opt, '='); u8view_t opt_no_eq = { .p = opt.p, - .len = eq_p == nullptr ? opt.len : (size_t)(eq_p - opt.p), + .len = eq_p == nullptr ? opt.len : eq_p - opt.p, }; for (size_t i = 0; i < nopts; i++) { |