Pacify MSVC warnings for random.c

This commit is contained in:
kyab
2014-05-10 23:50:57 +09:00
parent 2d8db3c6bf
commit 203740bac5
+1 -1
View File
@@ -44,7 +44,7 @@ static mrb_value
mrb_random_mt_srand(mrb_state *mrb, mt_state *t, mrb_value 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) {
seed = mrb_fixnum_value( 0 - mrb_fixnum(seed));
}