commit 5c0dd3494dd18880648a578741692df9d3c809d3
parent 024417325cc95585d914c34bbb79d7b6a6a37749
Author: CNLohr <lohr85@gmail.com>
Date: Sun, 22 Sep 2019 22:00:25 -0400
Merge pull request #57 from Michael137/srand_overflow_fix
Fix integer overflow during creation of random seed at startup
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cnping.c b/cnping.c
@@ -616,7 +616,7 @@ int main( int argc, const char ** argv )
ShowWindow (GetConsoleWindow(), SW_HIDE);
#endif
- srand( (int)(OGGetAbsoluteTime()*100000) );
+ srand( (uintmax_t)(OGGetAbsoluteTime()*100000) );
for( i = 0; i < sizeof( pattern ); i++ )
{