fusion: Improve parse_display_name.
This commit is contained in:
parent
4baf7a52f0
commit
135a70772d
|
@ -522,8 +522,16 @@ static HRESULT parse_display_name(IAssemblyNameImpl *name, LPCWSTR szAssemblyNam
|
|||
if (!str)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
ptr = strstrW(str, separator);
|
||||
ptr = strchrW(str, ',');
|
||||
if (ptr) *ptr = '\0';
|
||||
|
||||
/* no ',' but ' ' only */
|
||||
if( !ptr && strchrW(str, ' ') )
|
||||
{
|
||||
hr = FUSION_E_INVALID_NAME;
|
||||
goto done;
|
||||
}
|
||||
|
||||
name->name = strdupW(str);
|
||||
if (!name->name)
|
||||
return E_OUTOFMEMORY;
|
||||
|
|
|
@ -868,12 +868,9 @@ static void test_CreateAssemblyNameObject(void)
|
|||
to_widechar(namestr, "wine PublicKeyToken=1234567890abcdef");
|
||||
name = (IAssemblyName *)0xdeadbeef;
|
||||
hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL);
|
||||
todo_wine
|
||||
{
|
||||
ok(hr == FUSION_E_INVALID_NAME,
|
||||
"Expected FUSION_E_INVALID_NAME, got %08x\n", hr);
|
||||
ok(name == (IAssemblyName *)0xdeadbeef, "Expected 0xdeadbeef, got %p\n", name);
|
||||
}
|
||||
if(SUCCEEDED(hr)) IAssemblyName_Release(name);
|
||||
|
||||
/* no '=' */
|
||||
|
|
Loading…
Reference in New Issue