Module: wine Branch: refs/heads/master Commit: 340f7a3ec0204eeaf4532e5507bc02e48db86643 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=340f7a3ec0204eeaf4532e55...
Author: Robert Shearman rob@codeweavers.com Date: Mon May 8 12:42:16 2006 +0100
ole32: Fix the algorithm used in CompositeMonikerImpl_Hash to match native.
---
dlls/ole32/compositemoniker.c | 2 +- dlls/ole32/tests/moniker.c | 2 -- 2 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/dlls/ole32/compositemoniker.c b/dlls/ole32/compositemoniker.c index 99ffd3c..0646797 100644 --- a/dlls/ole32/compositemoniker.c +++ b/dlls/ole32/compositemoniker.c @@ -622,7 +622,7 @@ CompositeMonikerImpl_Hash(IMoniker* ifac res = IMoniker_Hash(tempMk, &tempHash); if(FAILED(res)) break; - *pdwHash = (*pdwHash * 37) + tempHash; + *pdwHash = *pdwHash ^ tempHash;
IMoniker_Release(tempMk); } diff --git a/dlls/ole32/tests/moniker.c b/dlls/ole32/tests/moniker.c index 8ae5c40..aaff209 100644 --- a/dlls/ole32/tests/moniker.c +++ b/dlls/ole32/tests/moniker.c @@ -657,11 +657,9 @@ static void test_generic_composite_monik hr = IMoniker_Hash(moniker, &hash); ok_ole_success(hr, IMoniker_Hash);
- todo_wine { ok(hash == 0xd87, "Hash value != 0xd87, instead was 0x%08lx\n", hash); - }
/* IsSystemMoniker test */