Skip to content

Commit

Permalink
Fix putting salt in the 1st argument of hash function
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenszhu committed May 1, 2024
1 parent 161204e commit 902458d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function Base.hash(s::BasicSymbolic, salt::UInt)::UInt
elseif E === ADD || E === MUL
if zero_salt
hashoffset = isadd(s) ? ADD_SALT : MUL_SALT
h_new = hash(hashoffset, hash(s.coeff, hash(s.dict)))
h_new = hash(s.coeff, hash(s.dict, hashoffset))
s.hash[] = h_new
return h_new
end
Expand Down

0 comments on commit 902458d

Please sign in to comment.