We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f9ab3e commit 185f453Copy full SHA for 185f453
src/core/t-pair.c
@@ -282,7 +282,10 @@
282
goto setPair;
283
284
case A_RANDOM:
285
- if (D_REF(2)) Trap0(RE_BAD_REFINES); // seed
+ if (D_REF(2)) { // seed
286
+ Set_Random(VAL_INT64(val));
287
+ return R_UNSET;
288
+ }
289
x1 = (REBD32)Random_Range((REBINT)x1, (REBOOL)D_REF(3));
290
y1 = (REBD32)Random_Range((REBINT)y1, (REBOOL)D_REF(3));
291
src/core/t-tuple.c
@@ -274,7 +274,10 @@
274
goto ret_value;
275
}
276
if (action == A_RANDOM) {
277
278
+ Set_Random(Compute_CRC24(vp, len));
279
280
281
for (;len > 0; len--, vp++) {
if (*vp)
*vp = (REBYTE)(Random_Int(D_REF(3)) % (1+*vp));
0 commit comments