quartz: Fix accessing variant string.

This commit is contained in:
Alexander Dorofeyev 2008-06-24 16:44:53 +03:00 committed by Alexandre Julliard
parent 2eee5fbfbe
commit c782cdad96
1 changed files with 2 additions and 2 deletions

View File

@ -1273,14 +1273,14 @@ static HRESULT WINAPI FilterMapper_EnumMatchingFilters(
if (SUCCEEDED(hrSub)) if (SUCCEEDED(hrSub))
{ {
len = (strlenW((WCHAR*)&V_UNION(&var, bstrVal))+1) * sizeof(WCHAR); len = (strlenW((WCHAR*)V_UNION(&var, bstrVal))+1) * sizeof(WCHAR);
if (!(regfilters[idx].Name = CoTaskMemAlloc(len*2))) if (!(regfilters[idx].Name = CoTaskMemAlloc(len*2)))
hr = E_OUTOFMEMORY; hr = E_OUTOFMEMORY;
} }
if (SUCCEEDED(hrSub)) if (SUCCEEDED(hrSub))
{ {
memcpy(regfilters[idx].Name, &V_UNION(&var, bstrVal), len); memcpy(regfilters[idx].Name, V_UNION(&var, bstrVal), len);
regfilters[idx].Clsid = clsid; regfilters[idx].Clsid = clsid;
idx++; idx++;
} }