fix compile error

msvc didn't have a problem with the previous code.
This commit is contained in:
gfgtdf 2014-12-10 19:15:42 +01:00
parent 7788fbaa01
commit 085507d18a

View file

@ -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 "