Commit 203740ba authored by kyab's avatar kyab

Pacify MSVC warnings for random.c

parent 2d8db3c6
...@@ -44,7 +44,7 @@ static mrb_value ...@@ -44,7 +44,7 @@ static mrb_value
mrb_random_mt_srand(mrb_state *mrb, mt_state *t, mrb_value seed) mrb_random_mt_srand(mrb_state *mrb, mt_state *t, mrb_value seed)
{ {
if (mrb_nil_p(seed)) { if (mrb_nil_p(seed)) {
seed = mrb_fixnum_value(time(NULL) + mt_rand(t)); seed = mrb_fixnum_value((mrb_int)(time(NULL) + mt_rand(t)));
if (mrb_fixnum(seed) < 0) { if (mrb_fixnum(seed) < 0) {
seed = mrb_fixnum_value( 0 - mrb_fixnum(seed)); seed = mrb_fixnum_value( 0 - mrb_fixnum(seed));
} }
......
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