| Server IP : 82.208.35.60 / Your IP : 216.73.217.116 Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31 System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64 User : studiokobylisy_cz ( 1008) PHP Version : 7.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/ports/games/openxcom/files/ |
Upload File : |
--- src/Engine/RNG.cpp.orig 2014-06-13 19:14:43 UTC
+++ src/Engine/RNG.cpp
@@ -17,6 +17,7 @@
* along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
*/
#include "RNG.h"
+#include <limits>
#include <math.h>
#include <time.h>
@@ -86,7 +87,7 @@ int generate(int min, int max)
double generate(double min, double max)
{
double num = next();
- return (double)(num / ((double)UINT64_MAX / (max - min)) + min);
+ return (double)(num / ((double)std::numeric_limits<uint64_t>::max() / (max - min)) + min);
}
/**