Commit 9d4eeaeb authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Copy memchr implementation from ntdll.

parent 75cdc3b6
......@@ -2267,7 +2267,10 @@ char* __cdecl MSVCRT_strrchr(const char *str, int c)
*/
void* __cdecl MSVCRT_memchr(const void *ptr, int c, MSVCRT_size_t n)
{
return memchr(ptr, c, n);
const unsigned char *p = ptr;
for (p = ptr; n; n--, p++) if (*p == c) return (void *)(ULONG_PTR)p;
return NULL;
}
/*********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment