Skip to content

Commit

Permalink
Fixed segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoDutertre committed Mar 3, 2021
1 parent 0e8214d commit a129f47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scranfilize.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,8 @@ static void init (int argc, char ** argv) {
}

if (seed < 0) {
uint64_t t = 8526563 * (unsigned long) times (0);
struct tms buffer;
uint64_t t = 8526563 * (unsigned long) times (&buffer);
uint64_t p = 3944621 * (unsigned long) getpid ();
uint64_t tmp = t + p;
seed = tmp & 0xffffffff;
Expand Down

0 comments on commit a129f47

Please sign in to comment.