Commit 42c328dd authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

widl: Ignore assignment of a duplicate uuid.

MSDN KB285146 article describes this behaviour, and the tests confirm that. Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 58b0788a
......@@ -494,10 +494,22 @@ static int ctl2_alloc_guid(
MSFT_GuidEntry *guid_space;
int hash_key;
chat("adding uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
guid->guid.Data4[4], guid->guid.Data4[5], guid->guid.Data4[6], guid->guid.Data4[7]);
hash_key = ctl2_hash_guid(&guid->guid);
offset = ctl2_find_guid(typelib, hash_key, &guid->guid);
if (offset != -1) return offset;
if (offset != -1)
{
warning("duplicate uuid {%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\n",
guid->guid.Data1, guid->guid.Data2, guid->guid.Data3,
guid->guid.Data4[0], guid->guid.Data4[1], guid->guid.Data4[2], guid->guid.Data4[3],
guid->guid.Data4[4], guid->guid.Data4[5], guid->guid.Data4[6], guid->guid.Data4[7]);
return -1;
}
offset = ctl2_alloc_segment(typelib, MSFT_SEG_GUID, sizeof(MSFT_GuidEntry), 0);
......
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