Comparison

net/dns.lua @ 2425:772b2caf762e

net.dns: Make sure math.randomseed() gets passed an integer
author Matthew Wild <mwild1@gmail.com>
date Thu, 07 Jan 2010 01:26:01 +0000 (2010-01-07)
parent 2387:92264ee3a0e4
child 2573:60493186fef6
comparison
equal deleted inserted replaced
2424:7d3b071e3b5b 2425:772b2caf762e
181 181
182 -- packet layer -------------------------------------------------- packet layer 182 -- packet layer -------------------------------------------------- packet layer
183 183
184 184
185 function dns.random(...) -- - - - - - - - - - - - - - - - - - - dns.random 185 function dns.random(...) -- - - - - - - - - - - - - - - - - - - dns.random
186 math.randomseed(10000*socket.gettime()); 186 math.randomseed(math.floor(10000*socket.gettime()));
187 dns.random = math.random; 187 dns.random = math.random;
188 return dns.random(...); 188 return dns.random(...);
189 end 189 end
190 190
191 191