Skip to content

Commit e77df71

Browse files
committed
Fix known type mismatch in sbs_elem_index (#661)
See #653. A complete audit has not been done, but let's just fix the known bug anyway. (cherry picked from commit 418515e)
1 parent ec7c738 commit e77df71

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cbits/shortbytestring.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <assert.h>
22
#include <stddef.h>
3+
#include <stdint.h>
34
#include <string.h>
45

56

@@ -20,7 +21,7 @@ sbs_memcmp_off(const void *s1,
2021

2122
ptrdiff_t
2223
sbs_elem_index(const void *s,
23-
int c,
24+
uint8_t c,
2425
size_t n)
2526
{
2627
const void *so = memchr(s, c, n);

0 commit comments

Comments
 (0)