Fix bug report 34320, about random returning two same values at start

git-svn-id: trunk@35259 -
This commit is contained in:
pierre 2017-01-08 09:19:50 +00:00
parent 729d582822
commit d5f2c58d32

View File

@ -643,10 +643,11 @@ begin
OldRandSeed:=RandSeed;
l_index:=MTWIST_N;
end;
if mt_index=MTWIST_N then
if l_index=MTWIST_N then
begin
mtwist_update_state;
l_index:=0;
mt_index:=1;
end;
result:=mt_state[l_index];
result:=result xor (result shr 11);