]> git.eshelyaron.com Git - emacs.git/commitdiff
(math-random-digit): Call math-init-random-base if var-RandSeed is nil.
authorJay Belanger <jay.p.belanger@gmail.com>
Thu, 16 Dec 2004 22:56:08 +0000 (22:56 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Thu, 16 Dec 2004 22:56:08 +0000 (22:56 +0000)
lisp/calc/calc-comb.el

index 24e3e5f182e0d9a2abea441504ebe8b000d12eea..262db6c9bda75cb106e633ac4edbe822c2124831 100644 (file)
 ;;; Shuffling algorithm from Numerical Recipes, section 7.1.
 (defun math-random-digit ()
   (let (i math-random-last)
-    (or (eq var-RandSeed math-last-RandSeed)
+    (or (and var-RandSeed (eq var-RandSeed math-last-RandSeed))
        (math-init-random-base))
     (or math-random-cache
        (progn