diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c index 0d4a07c9e16..bb3bac69f9f 100644 --- a/dlls/oleaut32/oleaut.c +++ b/dlls/oleaut32/oleaut.c @@ -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; } /******************************************************************************