From: Chris Hanson Date: Fri, 9 Jan 2004 20:22:22 +0000 (+0000) Subject: Fix bug: RANDOM-BYTE-VECTOR has to supply a default state object if X-Git-Tag: 20090517-FFI~1732 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=62a545f51d21685f9f10d4c194b618d28c35eb34;p=mit-scheme.git Fix bug: RANDOM-BYTE-VECTOR has to supply a default state object if none is given. --- 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))