Commit 135a7077 authored by Alexandre Goujon's avatar Alexandre Goujon Committed by Alexandre Julliard

fusion: Improve parse_display_name.

parent 4baf7a52
......@@ -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 '=' */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment