Make vgen.pl deterministic

This commit is contained in:
Geza Lore 2020-04-24 04:53:22 +01:00
parent c1665818b9
commit 10b4678ee6

View File

@ -322,7 +322,7 @@ sub rnd_op {
}
my $chooseweight = rnd($totweight);
$totweight = 0;
foreach my $opref (values %Ops) {
foreach my $opref (sort {$a->{name} cmp $b->{name}} values %Ops) {
if (_rnd_op_ok($opref,$paramref)) {
$totweight += $opref->{weight};
if ($chooseweight < $totweight) {