mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-19 12:56:17 +00:00
Fixed strchrW and strrchrW for a null character (spotted by Aric
Stewart).
This commit is contained in:
parent
0791d06215
commit
e40383699e
|
@ -215,14 +215,14 @@ static inline WCHAR *strcatW( WCHAR *dst, const WCHAR *src )
|
|||
|
||||
static inline WCHAR *strchrW( const WCHAR *str, WCHAR ch )
|
||||
{
|
||||
for ( ; *str; str++) if (*str == ch) return (WCHAR *)str;
|
||||
do { if (*str == ch) return (WCHAR *)str; } while (*str++);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline WCHAR *strrchrW( const WCHAR *str, WCHAR ch )
|
||||
{
|
||||
WCHAR *ret = NULL;
|
||||
for ( ; *str; str++) if (*str == ch) ret = (WCHAR *)str;
|
||||
do { if (*str == ch) ret = (WCHAR *)str; } while (*str++);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue