`mpuz-allow-double-multiplicator' is non-zero, and correct
calculation of `min'.
+2007-02-04 David Kastrup <dak@gnu.org>
+
+ * play/mpuz.el (mpuz-random-puzzle): Fix potential lockup when
+ `mpuz-allow-double-multiplicator' is non-zero, and correct
+ calculation of `min'.
+
2007-02-04 Per Abrahamsen <abraham@dina.kvl.dk>
* wid-edit.el (widget-default-create): Insert new text at the
(fillarray mpuz-board nil) ; erase the board
;; A,B,C,D & E, are the five rows of our multiplication.
;; Choose random values, discarding cases with leading zeros in C or D.
- (let* ((A (+ 112 (random 888)))
- (min (1+ (/ 1000 A)))
+ (let* ((A (if mpuz-allow-double-multiplicator (+ 112 (random 888))
+ (+ 125 (random 875))))
+ (min (1+ (/ 999 A)))
(B1 (+ min (random (- 10 min))))
B2 C D E)
(while (if (= B1 (setq B2 (+ min (random (- 10 min)))))