msvcrt: Copy strrchr 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:56 +02:00 committed by Alexandre Julliard
parent d9c9d21d66
commit a511c0937c
1 changed files with 3 additions and 1 deletions

View File

@ -2302,7 +2302,9 @@ char* __cdecl MSVCRT_strchr(const char *str, int c)
*/ */
char* __cdecl MSVCRT_strrchr(const char *str, int c) char* __cdecl MSVCRT_strrchr(const char *str, int c)
{ {
return strrchr(str, c); char *ret = NULL;
do { if (*str == (char)c) ret = (char*)str; } while (*str++);
return ret;
} }
/********************************************************************* /*********************************************************************