Skip to content

Commit

Permalink
fix compile error
Browse files Browse the repository at this point in the history
msvc didn't have a problem with the previous code.
  • Loading branch information
gfgtdf committed Dec 10, 2014
1 parent 7788fba commit 085507d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game_events/action_wml.cpp
Expand Up @@ -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 "
Expand Down

0 comments on commit 085507d

Please sign in to comment.