summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-03-29 21:55:49 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-03-29 21:55:49 +0200
commit3b732259c04dcb9ee763caf9f7697677624b7dc3 (patch)
tree42d14b5b97f1abe78a97a15010e2d53e8f91db9d /lib
parentdd613adcfe53726d07782166e0805284598033da (diff)
parent794f9527da0dc587c73240f1b8cf2f0511277803 (diff)
downloadNim-3b732259c04dcb9ee763caf9f7697677624b7dc3.tar.gz
Merge pull request #4009 from PMunch/json-objecthashing-fix
Changed the JSON object hashing procedure (fixing #3972)
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/json.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/json.nim b/lib/pure/json.nim
index 30004da84..b0179cd82 100644
--- a/lib/pure/json.nim
+++ b/lib/pure/json.nim
@@ -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 =