Fixing random() to work with longs.
This commit is contained in:
parent
03d7c9b846
commit
75d1f5053c
|
@ -40,7 +40,7 @@ long random(long howbig)
|
|||
if (howbig == 0){
|
||||
return 0;
|
||||
}
|
||||
return rand() % howbig;
|
||||
return (rand() * 0x10000L + rand()) % howbig;
|
||||
}
|
||||
|
||||
long random(long howsmall, long howbig)
|
||||
|
|
Loading…
Reference in New Issue