From 11607987d6c1c980a002239de18dafadc172273e Mon Sep 17 00:00:00 2001 From: Matthew Craven Date: Wed, 14 Feb 2024 18:02:51 -0500 Subject: [PATCH] Fix known type mismatch in sbs_elem_index See #653. A complete audit has not been done, but let's just fix the known bug anyway. --- cbits/shortbytestring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cbits/shortbytestring.c b/cbits/shortbytestring.c index 3cadc94bc..307a92233 100644 --- a/cbits/shortbytestring.c +++ b/cbits/shortbytestring.c @@ -1,5 +1,6 @@ #include #include +#include #include @@ -20,7 +21,7 @@ sbs_memcmp_off(const void *s1, ptrdiff_t sbs_elem_index(const void *s, - int c, + uint8_t c, size_t n) { const void *so = memchr(s, c, n);