diff --git a/reactos/lib/msvcrt/string/memccpy.c b/reactos/lib/msvcrt/string/memccpy.c index 42fd26b0795..98d712a50b7 100644 --- a/reactos/lib/msvcrt/string/memccpy.c +++ b/reactos/lib/msvcrt/string/memccpy.c @@ -4,6 +4,18 @@ void * _memccpy (void *to, const void *from,int c,size_t count) { - memcpy(to,from,count); - return memchr(to,c,count); + char t; + size_t i; + char *dst=(char*)to; + const char *src=(const char*)from; + + for ( i = 0; i < count; i++ ) + { + dst[i] = t = src[i]; + if ( t == '\0' ) + break; + if ( t == c ) + return &dst[i+1]; + } + return NULL; /* didn't copy c */ } diff --git a/reactos/lib/msvcrt/string/strrev.c b/reactos/lib/msvcrt/string/strrev.c index d36b7a3dee7..fac5a47b1ff 100644 --- a/reactos/lib/msvcrt/string/strrev.c +++ b/reactos/lib/msvcrt/string/strrev.c @@ -2,17 +2,18 @@ char * _strrev(char *s) { - char *e; - char a; - e=s; + char a, *b, *e; + b=e=s; while (*e) e++; - while (s