From 045f4bb5b1767140c4f6cfe2d2002553925c4205 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 30 Oct 2024 08:28:15 +0100 Subject: Make string view lengths signed --- lib/mbstring/u8chr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/mbstring/u8chr.c') diff --git a/lib/mbstring/u8chr.c b/lib/mbstring/u8chr.c index 5ddcdd8..4006ce5 100644 --- a/lib/mbstring/u8chr.c +++ b/lib/mbstring/u8chr.c @@ -79,7 +79,7 @@ u8chr(u8view_t sv, rune ch) char8_t buf[U8_LEN_MAX]; int m = rtou8(buf, sizeof(buf), ch); - if (sv.len < (size_t)m) + if (sv.len < m) return nullptr; switch (m) { case 1: -- cgit v1.2.3