libwine: Avoid converting the final null in strlwrW and struprW.

This commit is contained in:
Alexandre Julliard 2011-09-08 11:16:51 +02:00
parent 94a9db6383
commit f7c98b036c
1 changed files with 4 additions and 4 deletions

View File

@ -265,15 +265,15 @@ WINE_UNICODE_INLINE size_t strcspnW( const WCHAR *str, const WCHAR *reject )
WINE_UNICODE_INLINE WCHAR *strlwrW( WCHAR *str ) WINE_UNICODE_INLINE WCHAR *strlwrW( WCHAR *str )
{ {
WCHAR *ret = str; WCHAR *ret;
while ((*str = tolowerW(*str))) str++; for (ret = str; *str; str++) *str = tolowerW(*str);
return ret; return ret;
} }
WINE_UNICODE_INLINE WCHAR *struprW( WCHAR *str ) WINE_UNICODE_INLINE WCHAR *struprW( WCHAR *str )
{ {
WCHAR *ret = str; WCHAR *ret;
while ((*str = toupperW(*str))) str++; for (ret = str; *str; str++) *str = toupperW(*str);
return ret; return ret;
} }