Skip to content
Snippets Groups Projects
Commit f2918f9e authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard
Browse files

CompareStringW returned wrong results sometimes.

parent 33915551
No related branches found
No related tags found
No related merge requests found
......@@ -2533,7 +2533,10 @@ UINT WINAPI CompareStringW(DWORD lcid, DWORD fdwStyle,
len = l1<l2 ? l1:l2;
ret = (fdwStyle & NORM_IGNORECASE) ? strncmpiW(s1,s2,len) : strncmpW(s1,s2,len);
/* not equal, return 1 or 3 */
if(ret!=0) return ret+2;
if(ret!=0) {
/* need to translate result */
return ((int)ret < 0) ? 1 : 3;
}
/* same len, return 2 */
if(l1==l2) return 2;
/* the longer one is lexically greater */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment