From 2064173f3b789cf78d19e7489bdabe84cb9a94aa Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 3 Apr 2015 12:10:30 +0200 Subject: util.datamanager: Fix traceback due to %s in log message --- util/datamanager.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/datamanager.lua b/util/datamanager.lua index b82349f1..b4138638 100644 --- a/util/datamanager.lua +++ b/util/datamanager.lua @@ -293,7 +293,7 @@ function users(host, store, typ) local mode, err = lfs.attributes(store_dir, "mode"); if not mode then - return function() log("debug", err or (store_dir .. " does not exist")) end + return function() log("debug", "%s", err or (store_dir .. " does not exist")) end end local next, state = lfs.dir(store_dir); return function(state) -- cgit v1.2.3 From 38a580bfebacc3c2725f4224c0ca6e7b5c1f8a51 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 26 Apr 2015 19:50:24 +0200 Subject: net.dns: Make sure argument to math.randomseed does not overflow a 32 bit *signed* int (blame Lua). Closes #439 --- net/dns.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dns.lua b/net/dns.lua index 28cb4419..763ee9ec 100644 --- a/net/dns.lua +++ b/net/dns.lua @@ -225,7 +225,7 @@ end function dns.random(...) -- - - - - - - - - - - - - - - - - - - dns.random - math.randomseed(math.floor(10000*socket.gettime()) % 0x100000000); + math.randomseed(math.floor(10000*socket.gettime()) % 0x80000000); dns.random = math.random; return dns.random(...); end -- cgit v1.2.3