Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Apr 18, 2024
1 parent 7493856 commit 035f6e2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/jsonpak/private/rawops_sorted.nim
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ proc rawHash*(tree: JsonTree, n: NodePos): Hash =
let L = span(tree, n.int)
for i in 0..<L:
let n = NodePos(i+n.int) # careful
# as the keys are hashes of the values, we simply use them instead
h = h !& hash(tree.nodes[n.int])
case n.kind
of opcodeInt, opcodeFloat, opcodeString:
h = h !& (hash(n.kind) !& hash(n.str))
else:
h = h !& hash(tree.nodes[n.int])
result = !$h

0 comments on commit 035f6e2

Please sign in to comment.