Commit 12e4aa21 authored by Charles Blacklock's avatar Charles Blacklock Committed by Alexandre Julliard

oleaut32: Cleanup of previous VarBstrCmp patch.

parent 81c7c00b
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment