1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 01:00:20 +02:00

(scm_srfi60_copy_bit): Should be long not int for fixnum

bitshift, fixes 64-bit systems setting a bit between 32 and 63.
Reported by Aaron M. Ucko, Debian bug 396119.
This commit is contained in:
Kevin Ryde 2006-12-01 19:12:46 +00:00
parent 19a39718ac
commit dcee71903f

View file

@ -86,7 +86,7 @@ SCM_DEFINE (scm_srfi60_copy_bit, "copy-bit", 3, 0, 0,
if (ii < SCM_LONG_BIT-1) if (ii < SCM_LONG_BIT-1)
{ {
nn &= ~(1L << ii); /* zap bit at index */ nn &= ~(1L << ii); /* zap bit at index */
nn |= (bb << ii); /* insert desired bit */ nn |= ((long) bb << ii); /* insert desired bit */
return scm_from_long (nn); return scm_from_long (nn);
} }
else else