msvcrt: Copy memset implementation from ntdll.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2020-07-22 11:10:28 +02:00 committed by Alexandre Julliard
parent f02193738c
commit 41a5da9b76
1 changed files with 3 additions and 1 deletions

View File

@ -2263,7 +2263,9 @@ void * __cdecl MSVCRT_memcpy(void *dst, const void *src, MSVCRT_size_t n)
*/
void* __cdecl MSVCRT_memset(void *dst, int c, MSVCRT_size_t n)
{
return memset(dst, c, n);
volatile unsigned char *d = dst; /* avoid gcc optimizations */
while (n--) *d++ = c;
return dst;
}
/*********************************************************************