mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Pacify MSVC warnings for random.c
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user