From f0d47b7329fe2aa940865c06d29913f8069cbc5b Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Mon, 11 Jul 2016 14:00:53 -0700 Subject: [PATCH] random: no need to zero bytes in M\ object random-bytes*. --- basis/random/random.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/random/random.factor b/basis/random/random.factor index 496c5d8fbf..d1ee076a1f 100644 --- a/basis/random/random.factor +++ b/basis/random/random.factor @@ -19,7 +19,7 @@ GENERIC: random-32* ( obj -- n ) GENERIC: random-bytes* ( n obj -- byte-array ) M: object random-bytes* - [ integer>fixnum-strict [ ] keep ] dip + [ integer>fixnum-strict [ (byte-array) ] keep ] dip [ over 4 >= ] [ [ 4 - ] dip [ random-32* 2over c:int c:set-alien-value ] keep