oleaut32: SysStringByteLen code clean up.

This commit is contained in:
Jacek Caban 2012-05-01 15:06:44 +02:00 committed by Alexandre Julliard
parent 7fded88895
commit ab509cde5e
1 changed files with 1 additions and 12 deletions

View File

@ -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;
}
/******************************************************************************