From 03b93fcbfaadd8125a0327ac0c07d10ade4d8d20 Mon Sep 17 00:00:00 2001 From: emarsden <emarsden> Date: Mon, 17 Mar 2003 16:07:08 +0000 Subject: [PATCH] The second argument to BIGNUM-ASHIFT-RIGHT is an UNSIGNED-BYTE, not an INTEGER. This fixes a bug in ASH: (ash (1+ most-positive-fixnum) (1- (- most-positive-fixnum))) produces an error. Noted by Christopher Rhodes on #lisp. --- code/bignum.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/bignum.lisp b/code/bignum.lisp index 7f3f5f34a..a33cca857 100644 --- a/code/bignum.lisp +++ b/code/bignum.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bignum.lisp,v 1.32 2003/03/04 15:14:17 toy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bignum.lisp,v 1.33 2003/03/17 16:07:08 emarsden Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1338,7 +1338,7 @@ down to individual words.") ;;; (defun bignum-ashift-right (bignum x) (declare (type bignum-type bignum) - (fixnum x)) + (type unsigned-byte x)) (let ((bignum-len (%bignum-length bignum))) (declare (type bignum-index bignum-len)) (multiple-value-bind (digits n-bits) -- GitLab