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 )
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline WCHAR *strrchrW( const WCHAR *str, WCHAR ch )
|
static inline WCHAR *strrchrW( const WCHAR *str, WCHAR ch )
|
||||||
{
|
{
|
||||||
WCHAR *ret = NULL;
|
WCHAR *ret = NULL;
|
||||||
for ( ; *str; str++) if (*str == ch) ret = (WCHAR *)str;
|
do { if (*str == ch) ret = (WCHAR *)str; } while (*str++);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue