https://bugs.winehq.org/show_bug.cgi?id=55042
Bug ID: 55042 Summary: scrrun: dictionary get_num_hash generating the same hash for 2175 and 6259 Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: scrrun Assignee: wine-bugs@winehq.org Reporter: jsm174@gmail.com Distribution: ---
In vbscript, I had some code like this:
Set FlexDMDDict = CreateObject("Scripting.Dictionary")
FlexDMDDict.Add 0, "VPX.DMD_Space" FlexDMDDict.Add 63, "VPX.DMD_O" FlexDMDDict.Add 2175,"VPX.DMD_8" . . FlexDMDDict.Add 6259, "VPX.DMD_R"
I was getting VBSE_ACTION_NOT_SUPPORTED on the last line, so I put a printf in the `get_num_hash`:
static DWORD get_num_hash(FLOAT num) { DWORD x = (*((DWORD*)&num)) % DICT_HASH_MOD; printf("get_num_hash: num=%f, hash=%u\n", num, x); return (*((DWORD*)&num)) % DICT_HASH_MOD; }
I'm getting:
get_num_hash: num=2175.000000, hash=977 get_num_hash: num=6259.000000, hash=977
FWIW, I'm using this on macos, so DWORD is set to:
typedef unsigned int DWORD, *PDWORD, *LPDWORD;
https://bugs.winehq.org/show_bug.cgi?id=55042
francisdb francisdb@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |francisdb@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=55042
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |8.10 Status|UNCONFIRMED |NEW Ever confirmed|0 |1
--- Comment #1 from Nikolay Sivov bunglehead@gmail.com --- Thanks, I see what's going on.
https://bugs.winehq.org/show_bug.cgi?id=55042
--- Comment #2 from Nikolay Sivov bunglehead@gmail.com --- Check this one please https://gitlab.winehq.org/wine/wine/-/merge_requests/3064.
https://bugs.winehq.org/show_bug.cgi?id=55042
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|scrrun: dictionary |IDictionary::Add() fails to |get_num_hash generating the |add entries with numerical |same hash for 2175 and 6259 |keys that has the same | |hashes
https://bugs.winehq.org/show_bug.cgi?id=55042
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com --- Matching hash value is not a problem here, the problem is that key comparison only checks for match in hash value and in actual key value.
https://bugs.winehq.org/show_bug.cgi?id=55042
--- Comment #4 from Jason Millard jsm174@gmail.com --- I just tested out 3064 and it's working great!!
I see you also fixed BYREF too which I had patched but never had a chance to report!!
Thank you again!!!
https://bugs.winehq.org/show_bug.cgi?id=55042
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|IDictionary::Add() fails to |IDictionary::Add() fails to |add entries with numerical |add entries with numerical |keys that has the same |keys that have the same |hashes |hashes
https://bugs.winehq.org/show_bug.cgi?id=55042
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |e6229b52735a182864dcd0a2bad | |7117fc0446004 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #5 from Nikolay Sivov bunglehead@gmail.com --- Marking fixed, https://source.winehq.org/git/wine.git/commit/e6229b52735a182864dcd0a2bad711....
https://bugs.winehq.org/show_bug.cgi?id=55042
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.11.
https://bugs.winehq.org/show_bug.cgi?id=55042
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |8.0.x