"Lei Zhang" <thestig(a)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. -- Alexandre Julliard julliard(a)winehq.org