Skip to content

Commit

Permalink
FIX: RANDOM can alter the sequence of series after PROTECT
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Oct 15, 2018
1 parent 9de4fec commit aa183b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/t-block.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,7 @@ static struct {
break;

case A_RANDOM:
if (IS_PROTECT_SERIES(VAL_SERIES(value))) Trap0(RE_PROTECTED);
if (!IS_BLOCK(value)) Trap_Action(VAL_TYPE(value), action);
if (D_REF(2)) Trap0(RE_BAD_REFINES); // seed
if (D_REF(4)) { // /only
Expand Down

0 comments on commit aa183b9

Please sign in to comment.