Skip to content

Commit

Permalink
Fix RNG seed initialization (#1383)
Browse files Browse the repository at this point in the history
  • Loading branch information
meiniKi authored Oct 9, 2024
1 parent 7c45980 commit cf42baa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/kernel/command.cc
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ void script_terminate_handler()
void CommandHandler::setupContext(Context *ctx)
{
if (ctx->settings.find(ctx->id("seed")) != ctx->settings.end())
ctx->rngstate = ctx->setting<uint64_t>("seed");
ctx->rngseed(ctx->setting<uint64_t>("seed"));

if (vm.count("verbose")) {
ctx->verbose = true;
Expand All @@ -447,7 +447,7 @@ void CommandHandler::setupContext(Context *ctx)
}

if (vm.count("seed")) {
ctx->rngstate = vm["seed"].as<uint64_t>();
ctx->rngseed(vm["seed"].as<uint64_t>());
}

if (vm.count("threads")) {
Expand Down

0 comments on commit cf42baa

Please sign in to comment.