Commit a437382f authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

fusion: Fix IAssemblyNameImpl_GetDisplayName behavior on PublicKeyToken containing 0.

parent d790b160
......@@ -361,8 +361,8 @@ static HRESULT WINAPI IAssemblyNameImpl_GetDisplayName(IAssemblyName *iface,
if ((dwDisplayFlags & ASM_DISPLAYF_PUBLIC_KEY_TOKEN) && (name->haspubkey))
{
WCHAR pkt[CHARS_PER_PUBKEY + 1];
static const WCHAR spec[] = {'%','0','x','%','0','x','%','0','x',
'%','0','x','%','0','x','%','0','x','%','0','x','%','0','x',0};
static const WCHAR spec[] = {'%','0','2','x','%','0','2','x','%','0','2','x',
'%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x','%','0','2','x',0};
lstrcatW(szDisplayName, separator);
......
......@@ -306,7 +306,7 @@ static const ASMPROP_RES enname[ASM_NAME_MAX_PARAMS] =
static const ASMPROP_RES pubkeyname[ASM_NAME_MAX_PARAMS] =
{
{S_OK, "", 0},
{S_OK, "\x12\x34\x56\x78\x90\xab\xcd\xef", 8},
{S_OK, "\x01\x23\x45\x67\x89\x0a\xbc\xde", 8},
{S_OK, "", 0},
{S_OK, "wine", 10},
{S_OK, "", 0},
......@@ -748,8 +748,8 @@ static void test_CreateAssemblyNameObject(void)
IAssemblyName_Release(name);
/* 'wine, PublicKeyToken=1234567890abcdef' */
to_widechar(namestr, "wine, PublicKeyToken=1234567890abcdef");
/* 'wine, PublicKeyToken=01234567890abcde' */
to_widechar(namestr, "wine, PublicKeyToken=01234567890abcde");
name = NULL;
hr = pCreateAssemblyNameObject(&name, namestr, CANOF_PARSE_DISPLAY_NAME, NULL);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
......@@ -758,7 +758,7 @@ static void test_CreateAssemblyNameObject(void)
size = MAX_PATH;
hr = IAssemblyName_GetDisplayName(name, str, &size, ASM_DISPLAYF_FULL);
ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
ok_aw("wine, PublicKeyToken=1234567890abcdef", str);
ok_aw("wine, PublicKeyToken=01234567890abcde", str);
ok(size == 38, "Expected 38, got %d\n", size);
size = MAX_PATH;
......
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