From fc96aa9e5058a0b064bbdeb20e85e951eb2b7703 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Tue, 12 Dec 2017 17:09:40 -0500 Subject: Modify Hash Functions. --- mediumlevelilinstruction.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mediumlevelilinstruction.h') 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); } }; -- cgit v1.3.1