net.dns: Make sure math.randomseed() gets passed an integer
authorMatthew Wild <mwild1@gmail.com>
Thu, 07 Jan 2010 01:26:01 +0000
changeset 2425 772b2caf762e
parent 2424 7d3b071e3b5b
child 2426 4cef9808662a
net.dns: Make sure math.randomseed() gets passed an integer
net/dns.lua
--- a/net/dns.lua	Wed Jan 06 16:20:56 2010 +0000
+++ b/net/dns.lua	Thu Jan 07 01:26:01 2010 +0000
@@ -183,7 +183,7 @@
 
 
 function dns.random(...)    -- - - - - - - - - - - - - - - - - - -  dns.random
-	math.randomseed(10000*socket.gettime());
+	math.randomseed(math.floor(10000*socket.gettime()));
 	dns.random = math.random;
 	return dns.random(...);
 end