diff options
-rw-r--r-- | src/shared/mem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/mem.c b/src/shared/mem.c index 3075963..0b03b58 100644 --- a/src/shared/mem.c +++ b/src/shared/mem.c @@ -5,7 +5,7 @@ void *memchr(const void *s, int c, size_t n) { const unsigned char *s2 = s; for (size_t i = 0; i < n; i++) { if (s2[i] == (unsigned char)c) - return &s2[i]; + return (void*)&s2[i]; } return NULL; } |