Mercurial > emacs
diff src/lread.c @ 21935:8dad06385435
(read1): Clear out extraneous bits at end of bool-vector.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Mon, 04 May 1998 15:29:47 +0000 |
parents | 8087931b409e |
children | 6635a9f225a9 |
line wrap: on
line diff
--- a/src/lread.c Mon May 04 15:12:05 1998 +0000 +++ b/src/lread.c Mon May 04 15:29:47 1998 +0000 @@ -1512,6 +1512,10 @@ val = Fmake_bool_vector (length, Qnil); bcopy (XSTRING (tmp)->data, XBOOL_VECTOR (val)->data, size_in_chars); + /* Clear the extraneous bits in the last byte. */ + if (XINT (length) != size_in_chars * BITS_PER_CHAR) + XBOOL_VECTOR (val)->data[size_in_chars - 1] + &= (1 << (XINT (length) % BITS_PER_CHAR)) - 1; return val; } Fsignal (Qinvalid_read_syntax, Fcons (make_string ("#&...", 5),