Skip to content

Commit

Permalink
Fixing issue reported in garycourt#14
Browse files Browse the repository at this point in the history
  • Loading branch information
guloic committed Feb 27, 2021
1 parent 0197ce3 commit c80e369
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion murmurhash3_gc.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,14 @@ function murmurhash3_32_gc(key, seed) {
h1 = ((((h1 & 0xffff) * 0xc2b2ae35) + ((((h1 >>> 16) * 0xc2b2ae35) & 0xffff) << 16))) & 0xffffffff;
h1 ^= h1 >>> 16;

return h1 >>> 0;


h1 = h1 >>> 0;

if (h1 & 0x80000000 == 0) {
return h1;
}
else {
return -( (h1 ^ 0xFFFFFFFF) + 1 )
}
}

0 comments on commit c80e369

Please sign in to comment.