mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
scrrun: Fix pointer hashing on 64-bit.
This commit is contained in:
parent
863c57e956
commit
f69bb9d6c5
2 changed files with 10 additions and 2 deletions
|
@ -846,7 +846,11 @@ static HRESULT get_flt_hash(FLOAT flt, LONG *hash)
|
|||
|
||||
static DWORD get_ptr_hash(void *ptr)
|
||||
{
|
||||
return PtrToUlong(ptr) % DICT_HASH_MOD;
|
||||
DWORD hash = PtrToUlong(ptr);
|
||||
#ifdef _WIN64
|
||||
hash ^= (ULONG_PTR)ptr >> 32;
|
||||
#endif
|
||||
return hash % 1201;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dictionary_get_HashVal(IDictionary *iface, VARIANT *key, VARIANT *hash)
|
||||
|
|
|
@ -193,7 +193,11 @@ static DWORD get_num_hash(FLOAT num)
|
|||
|
||||
static DWORD get_ptr_hash(void *ptr)
|
||||
{
|
||||
return PtrToUlong(ptr) % 1201;
|
||||
DWORD hash = PtrToUlong(ptr);
|
||||
#ifdef _WIN64
|
||||
hash ^= (ULONG_PTR)ptr >> 32;
|
||||
#endif
|
||||
return hash % 1201;
|
||||
}
|
||||
|
||||
typedef union
|
||||
|
|
Loading…
Reference in a new issue