diff options
| author | relnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-09 05:13:39 +0000 |
|---|---|---|
| committer | relnev <relnev@5198baeb-e213-0410-be47-fc2ff85ca46f> | 2003-01-09 05:13:39 +0000 |
| commit | 4a1f4593d1af6a832904df2ad375d305c0d23ecb (patch) | |
| tree | 9389d1cfe1ee9e70aac66c87ee97408000b5edd7 /Source/Support.cpp | |
| parent | 544af26f4ead1c0ba48d57fb0a47afded3218475 (diff) | |
| download | blackshades-4a1f4593d1af6a832904df2ad375d305c0d23ecb.tar.gz | |
Random fix
git-svn-id: svn://svn.icculus.org/blackshades/trunk@59 5198baeb-e213-0410-be47-fc2ff85ca46f
Diffstat (limited to 'Source/Support.cpp')
| -rw-r--r-- | Source/Support.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/Support.cpp b/Source/Support.cpp index b870db1..abfa176 100644 --- a/Source/Support.cpp +++ b/Source/Support.cpp @@ -1,3 +1,5 @@ +#include <stdio.h> +#include <stdlib.h> #include <sys/types.h> #include <dirent.h> #include <sys/stat.h> @@ -11,8 +13,11 @@ int Random() { - /* holdon, will fix in a minute! */ - return rand(); +#if RAND_MAX >= 65535 + return (rand() % 65535) - 32767; +#else +#error please fix this for your platform +#endif } void Microseconds(UnsignedWide *microTickCount) |
