oleaut32: Cleanup of previous VarBstrCmp patch.

This commit is contained in:
Charles Blacklock 2006-12-01 16:49:46 +00:00 committed by Alexandre Julliard
parent 81c7c00bb2
commit 12e4aa2165
1 changed files with 5 additions and 3 deletions

View File

@ -6652,14 +6652,16 @@ HRESULT WINAPI VarBstrCmp(BSTR pbstrLeft, BSTR pbstrRight, LCID lcid, DWORD dwFl
if (lcid == 0)
{
ret = memcmp(pbstrLeft, pbstrRight, min(SysStringByteLen(pbstrLeft), SysStringByteLen(pbstrRight)));
unsigned int lenLeft = SysStringByteLen(pbstrLeft);
unsigned int lenRight = SysStringByteLen(pbstrRight);
ret = memcmp(pbstrLeft, pbstrRight, min(lenLeft, lenRight));
if (ret < 0)
return VARCMP_LT;
if (ret > 0)
return VARCMP_GT;
if (SysStringByteLen(pbstrLeft) < SysStringByteLen(pbstrRight))
if (lenLeft < lenRight)
return VARCMP_LT;
if (SysStringByteLen(pbstrLeft) > SysStringByteLen(pbstrRight))
if (lenLeft > lenRight)
return VARCMP_GT;
return VARCMP_EQ;
}