forked from Mirrors/wine-wine
comctl32: Fix lstrncmpiW() so its return value is standard and use the CSTR_XXX macros.
parent
58d7011133
commit
bede13b335
|
@ -559,11 +559,8 @@ static inline int textcmpWT(LPCWSTR aw, LPCWSTR bt, BOOL isW)
|
||||||
|
|
||||||
static inline int lstrncmpiW(LPCWSTR s1, LPCWSTR s2, int n)
|
static inline int lstrncmpiW(LPCWSTR s1, LPCWSTR s2, int n)
|
||||||
{
|
{
|
||||||
int res;
|
|
||||||
|
|
||||||
n = min(min(n, lstrlenW(s1)), lstrlenW(s2));
|
n = min(min(n, lstrlenW(s1)), lstrlenW(s2));
|
||||||
res = CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, s1, n, s2, n);
|
return CompareStringW(LOCALE_USER_DEFAULT, NORM_IGNORECASE, s1, n, s2, n) - CSTR_EQUAL;
|
||||||
return res ? res - sizeof(WCHAR) : res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/******** Debugging functions *****************************************/
|
/******** Debugging functions *****************************************/
|
||||||
|
|
Loading…
Reference in New Issue