Commit 1f0da065 authored by Thomas White's avatar Thomas White
Browse files

pattern_sim: Make random numbers really random

parent 49004f0c
......@@ -273,6 +273,16 @@ int main(int argc, char *argv[])
}
/* FIXME: Make this optional */
if ( 1 ) {
FILE *fh;
unsigned int seed;
fh = fopen("/dev/urandom", "r");
fread(&seed, sizeof(seed), 1, fh);
fclose(fh);
srand(seed);
}
if ( filename == NULL ) {
filename = strdup("molecule.pdb");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment