[PATCH 4/8] msi: Fix merging string type checks.

Alexandre Julliard julliard at winehq.org
Tue Oct 20 08:06:57 CDT 2009


Hib Eris <hib at hiberis.nl> writes:

> +static BOOL merge_type_match(LPCWSTR type1, LPCWSTR type2)
> +{
> +    const WCHAR szl[] = {'l', 0};
> +    const WCHAR szs[] = {'s', 0};
> +    const WCHAR szL[] = {'L', 0};
> +    const WCHAR szS[] = {'S', 0};
> +
> +    if ((!StrCmpNW(type1, szl, 1) || !StrCmpNW(type1, szs, 1)) &&
> +        (!StrCmpNW(type2, szl, 1) || !StrCmpNW(type2, szs, 1)))
> +        return TRUE;
> +
> +    if ((!StrCmpNW(type1, szL, 1) || !StrCmpNW(type1, szS, 1)) &&
> +        (!StrCmpNW(type2, szL, 1) || !StrCmpNW(type2, szS, 1)))
> +        return TRUE;
> +
> +    return !StrCmpNW(type1, type2, 1);
> +}

Surely you don't need StrCmpNW to compare one character...

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list