"Lei Zhang" thestig@google.com writes:
diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index daeac85..713ebae 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -6942,7 +6942,24 @@ HRESULT WINAPI VarBstrCmp(BSTR pbstrLeft, BSTR pbstrRight, LCID lcid, DWORD dwFl if (!pbstrLeft || !*pbstrLeft) { if (!pbstrRight || !*pbstrRight)
return VARCMP_EQ;
{
UINT ll;
UINT lr;
if (lcid)
{
ll = SysStringLen(pbstrLeft);
lr = SysStringLen(pbstrRight);
}
else
{
ll = SysStringByteLen(pbstrLeft);
lr = SysStringByteLen(pbstrRight);
}
if (ll == lr)
return VARCMP_EQ;
return ll < lr ? VARCMP_LT : VARCMP_GT;
}
That's ugly, you shouldn't need such special handling here, you should simply fall through to the normal comparisons which should give the correct results.
On Tue, Aug 5, 2008 at 3:15 AM, Alexandre Julliard julliard@winehq.org wrote:
That's ugly, you shouldn't need such special handling here, you should simply fall through to the normal comparisons which should give the correct results.
Falling through didn't work. CompareStringW does not like NULL inputs. It still needs a little bit of special handling. Will resubmit patch.