fix compile error
msvc didn't have a problem with the previous code.
This commit is contained in:
parent
7788fbaa01
commit
085507d18a
1 changed files with 1 additions and 1 deletions
|
@ -1996,7 +1996,7 @@ WML_HANDLER_FUNCTION(set_variable, /*event_info*/, cfg)
|
|||
|
||||
assert(num_choices > 0);
|
||||
// On most plattforms long can never hold a bigger value than a uint32_t, but there are exceptions where long is 64 bit.
|
||||
if(unsigned long(num_choices) > std::numeric_limits<uint32_t>::max()) {
|
||||
if(static_cast<unsigned long>(num_choices) > std::numeric_limits<uint32_t>::max()) {
|
||||
WRN_NG << "Requested random number with an upper bound of "
|
||||
<< num_choices
|
||||
<< " however the maximum number generated will be "
|
||||
|
|
Loading…
Add table
Reference in a new issue