In some places rand() was called explicitly, rather than through the
(configured) place-holder random().
static int initDone=FALSE;
if(!initDone) {
- for(next = WhitePawn; next<EmptySquare; next++) keys[next] = rand()>>8 ^ rand()<<6 ^rand()<<20;
+ for(next = WhitePawn; next<EmptySquare; next++) keys[next] = random()>>8 ^ random()<<6 ^random()<<20;
initDone = TRUE;
}
dummyInfo.variant = VariantNormal;
void SetRandom(int n)
{
- int r = n==2 ? -1 : rand() & (1<<30)-1;
+ int r = n==2 ? -1 : random() & (1<<30)-1;
char buf[MSG_SIZ];
snprintf(buf, MSG_SIZ, "%d", r);
SetWidgetText(&shuffleOptions[1], buf, 0);