msvcrt: Copy memchr implementation from ntdll.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
75cdc3b605
commit
9d4eeaeb77
|
@ -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;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
Loading…
Reference in New Issue