Table.Random broken

Issue #32 resolved
Fabian Maurer created an issue

Given the following code:

say "x", "x";
table = {};
table[1] = "1";
table[2] = "2";
table[3] = "3";

for i=0, 20 do
    local rnd = Table.Random(table);
    say "rnd $i", "$rnd";
    if(rnd ~=nil) then
        say "dump", Table.Dump(rnd);
    end
end

This code sometimes outputs nil and sometimes it prints the table itself.

Comments (4)

  1. Log in to comment