mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
Merge pull request #4009 from PMunch/json-objecthashing-fix
Changed the JSON object hashing procedure (fixing #3972)
This commit is contained in:
@@ -787,7 +787,7 @@ proc hash*(n: JsonNode): Hash =
|
||||
|
||||
proc hash*(n: Table[string, JsonNode]): Hash =
|
||||
for key, val in n:
|
||||
result = result !& hash(key) !& hash(val)
|
||||
result = result xor (hash(key) !& hash(val))
|
||||
result = !$result
|
||||
|
||||
proc len*(n: JsonNode): int =
|
||||
|
||||
Reference in New Issue
Block a user