Commit ab509cde authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

oleaut32: SysStringByteLen code clean up.

parent 7fded888
......@@ -171,18 +171,7 @@ UINT WINAPI SysStringLen(BSTR str)
*/
UINT WINAPI SysStringByteLen(BSTR str)
{
DWORD* bufferPointer;
if (!str) return 0;
/*
* The length of the string (in bytes) is contained in a DWORD placed
* just before the BSTR pointer
*/
bufferPointer = (DWORD*)str;
bufferPointer--;
return (int)(*bufferPointer);
return str ? *((DWORD*)str-1) : 0;
}
/******************************************************************************
......
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