From 62a545f51d21685f9f10d4c194b618d28c35eb34 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 9 Jan 2004 20:22:22 +0000 Subject: [PATCH] Fix bug: RANDOM-BYTE-VECTOR has to supply a default state object if none is given. --- v7/src/runtime/random.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/v7/src/runtime/random.scm b/v7/src/runtime/random.scm index 766c25e28..0f594c87c 100644 --- a/v7/src/runtime/random.scm +++ b/v7/src/runtime/random.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: random.scm,v 14.34 2004/01/06 06:22:32 cph Exp $ +$Id: random.scm,v 14.35 2004/01/09 20:22:22 cph Exp $ Copyright 1988,1989,1993,1994,1995,1996 Massachusetts Institute of Technology Copyright 1998,1999,2000,2001,2003,2004 Massachusetts Institute of Technology @@ -159,7 +159,9 @@ USA. (flo:/ (int:->flonum (%random-integer flimit state)) flimit.)) (define (random-byte-vector n #!optional state) - (let ((state (if (default-object? state) #f state)) + (let ((state + (guarantee-random-state (if (default-object? state) #f state) + 'RANDOM-BYTE-VECTOR)) (s (make-string n))) (do ((i 0 (fix:+ i 1))) ((fix:= i n)) -- 2.25.1