Skip to content
Snippets Groups Projects
Commit ab509cde authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard
Browse files

oleaut32: SysStringByteLen code clean up.

parent 7fded888
Branches
Tags
No related merge requests found
......@@ -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;
}
/******************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment