Skip to content

Commit aa183b9

Browse files
committed
FIX: RANDOM can alter the sequence of series after PROTECT
Fixes: metaeducation/rebol-issues#1779
1 parent 9de4fec commit aa183b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/t-block.c

+1
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,7 @@ static struct {
833833
break;
834834

835835
case A_RANDOM:
836+
if (IS_PROTECT_SERIES(VAL_SERIES(value))) Trap0(RE_PROTECTED);
836837
if (!IS_BLOCK(value)) Trap_Action(VAL_TYPE(value), action);
837838
if (D_REF(2)) Trap0(RE_BAD_REFINES); // seed
838839
if (D_REF(4)) { // /only

0 commit comments

Comments
 (0)