oleaut: Fix VarFormat for VT_NULL variants.
This commit is contained in:
parent
7406cc210b
commit
93acfeb7f0
|
@ -1785,10 +1785,8 @@ static void test_VarFormat(void)
|
|||
/* VT_NULL */
|
||||
V_VT(&in) = VT_NULL;
|
||||
hres = pVarFormat(&in,NULL,fd,fw,0,&out);
|
||||
todo_wine {
|
||||
ok(hres == S_OK, "VarFormat failed with 0x%08lx\n", hres);
|
||||
ok(out == NULL, "expected NULL formatted string\n");
|
||||
}
|
||||
|
||||
/* Invalid args */
|
||||
hres = pVarFormat(&in,NULL,fd,fw,flags,NULL);
|
||||
|
|
|
@ -2007,6 +2007,9 @@ HRESULT WINAPI VarFormatFromTokens(LPVARIANT pVarIn, LPOLESTR lpszFormat,
|
|||
if (!pVarIn || !rgbTok)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (V_VT(pVarIn) == VT_NULL)
|
||||
return S_OK;
|
||||
|
||||
if (*rgbTok == FMT_TO_STRING || header->type == FMT_TYPE_GENERAL)
|
||||
{
|
||||
/* According to MSDN, general format acts somewhat like the 'Str'
|
||||
|
|
Loading…
Reference in New Issue