Skip to content

Commit

Permalink
_array_pick_item_by_seed(): fixed an overflow issue with too large se…
Browse files Browse the repository at this point in the history
…eds.
  • Loading branch information
gheja committed Oct 22, 2013
1 parent 308ba3a commit a978801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/13312.js
Expand Up @@ -771,7 +771,7 @@ window.onload = function()

A._array_pick_item_by_seed = function(array, seed, n)
{
var i = (seed * 3518.7621 * n) | 0;
var i = Math.abs((seed * 3518.7621 * n) | 0);
return array[i % array.length];
}

Expand Down

0 comments on commit a978801

Please sign in to comment.