quartz: Don't assume that strlenW of a constant string can be determined at compile time.

Use sizeof instead to calculate the size of wszKeyName in 
FilterMapper2_CreateCategory.
This commit is contained in:
Rob Shearman 2008-02-29 11:12:32 +00:00 committed by Alexandre Julliard
parent 8d2af8e3f3
commit 1c0122d14e

View file

@ -41,6 +41,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(quartz);
#define ARRAYSIZE(array) (sizeof(array)/sizeof((array)[0]))
/* Unexposed IAMFilterData interface */
typedef struct IAMFilterData IAMFilterData;
@ -311,7 +313,7 @@ static HRESULT WINAPI FilterMapper2_CreateCategory(
{
LPWSTR wClsidAMCat = NULL;
LPWSTR wClsidCategory = NULL;
WCHAR wszKeyName[strlenW(wszClsidSlash) + strlenW(wszSlashInstance) + (CHARS_IN_GUID-1) * 2 + 1];
WCHAR wszKeyName[ARRAYSIZE(wszClsidSlash)-1 + ARRAYSIZE(wszSlashInstance)-1 + (CHARS_IN_GUID-1) * 2 + 1];
HKEY hKey = NULL;
LONG lRet;
HRESULT hr;