diff options
Diffstat (limited to 'src/post/goom/goom_tools.c')
-rw-r--r-- | src/post/goom/goom_tools.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/post/goom/goom_tools.c b/src/post/goom/goom_tools.c index ec7ec1934..6753da544 100644 --- a/src/post/goom/goom_tools.c +++ b/src/post/goom/goom_tools.c @@ -14,7 +14,11 @@ void goom_random_free(GoomRandom *grandom) { void goom_random_update_array(GoomRandom *grandom, int numberOfValuesToChange) { while (numberOfValuesToChange > 0) { +#if RAND_MAX < 0x10000 + grandom->array[grandom->pos++] = ((rand()<<16)+rand()) / 127; +#else grandom->array[grandom->pos++] = rand() / 127; +#endif numberOfValuesToChange--; } } |