aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-05-25 22:33:42 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-05-25 22:33:42 -0700
commit4c65128582fc5ff06dfa269f260fb99cf40b5786 (patch)
treec472db2d59fcfb836fe3ca0e132f983458a7f56f
parent8cf905cd2cd3113db87fcd172637cf9a7f677c69 (diff)
Properly seeding the RNG
-rwxr-xr-xnowopen1
1 files changed, 1 insertions, 0 deletions
diff --git a/nowopen b/nowopen
index 3510015..82e3643 100755
--- a/nowopen
+++ b/nowopen
@@ -165,6 +165,7 @@ if #options == 0 and not raw_print then
table.insert(lines, center("¯\\_(ツ)_/¯", cols))
else
if randomize then
+ math.randomseed(os.time())
options = {options[math.random(#options)]}
else
table.sort(options, function(o1, o2) return o1.until_close < o2.until_close end)