diff options
| author | Brian Potchik <brian@vector35.com> | 2017-12-12 17:09:40 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2017-12-12 17:09:40 -0500 |
| commit | fc96aa9e5058a0b064bbdeb20e85e951eb2b7703 (patch) | |
| tree | aa887bcdbd4489b226e93903ad4c55fc41ef1a9d /mediumlevelilinstruction.h | |
| parent | 859b86c233a8783f134c498b9c32ea1826ed4503 (diff) | |
Modify Hash Functions.
Diffstat (limited to 'mediumlevelilinstruction.h')
| -rw-r--r-- | mediumlevelilinstruction.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mediumlevelilinstruction.h b/mediumlevelilinstruction.h index 9a76cb6c..8bab199f 100644 --- a/mediumlevelilinstruction.h +++ b/mediumlevelilinstruction.h @@ -135,10 +135,11 @@ namespace std #else typedef BinaryNinja::SSAVariable argument_type; #endif - typedef uint64_t result_type; + typedef uint32_t result_type; result_type operator()(argument_type const& value) const { - return ((result_type)value.var.ToIdentifier()) ^ ((result_type)value.version << 40); + uint64_t hashTmp = ((uint64_t)value.var.ToIdentifier()) ^ ((uint64_t)value.version << 40); + return (uint32_t)((hashTmp >> 32) ^ (uint32_t)hashTmp); } }; |
