CompareStringW should return 0 when one of the provided strings is a

NULL pointer.
This commit is contained in:
Alberto Massari 2002-12-19 04:10:35 +00:00 committed by Alexandre Julliard
parent 0ca46dc338
commit 31a7cad486
1 changed files with 5 additions and 0 deletions

View File

@ -1255,6 +1255,11 @@ int WINAPI CompareStringW(LCID lcid, DWORD fdwStyle,
if(fdwStyle & NORM_IGNORESYMBOLS)
FIXME("IGNORESYMBOLS not supported\n");
if(s1==NULL || s2==NULL)
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
/* Is strcmp defaulting to string sort or to word sort?? */
/* FIXME: Handle NORM_STRINGSORT */
l1 = (l1==-1)?strlenW(s1):l1;