Comparison

net/dns.lua @ 2788:fb47ac5ed04c

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
parent 2763:083430330585
child 2877:1edeb8fe7d14
comparison
equal deleted inserted replaced
2787:1067a454a068 2788:fb47ac5ed04c
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