Commit 4a39b0ab authored by salix5's avatar salix5

fix Warning C26451

parent 8f423874
...@@ -38,7 +38,7 @@ public: ...@@ -38,7 +38,7 @@ public:
return (int)(l + x % range); return (int)(l + x % range);
} }
int get_random_integer_old(int l, int h) { int get_random_integer_old(int l, int h) {
int result = (int)((double)rng() / rand_max * (h - l + 1)) + l; int result = (int)((double)rng() / rand_max * ((double)h - l + 1)) + l;
if (result > h) if (result > h)
result = h; result = h;
return result; return result;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment