diff options
| author | Richard M. Stallman | 1997-01-24 05:47:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-01-24 05:47:12 +0000 |
| commit | 90ed3ec5e7bec48666ccaab662b923eabcb77bd8 (patch) | |
| tree | c822bc98cc7233cce37ea6d69deb11250bc4bd0c /src | |
| parent | 83434bdaa233dae6183ee1d9f451ff28ca474b8e (diff) | |
| download | emacs-90ed3ec5e7bec48666ccaab662b923eabcb77bd8.tar.gz emacs-90ed3ec5e7bec48666ccaab662b923eabcb77bd8.zip | |
(read1): Round size of bool-vector properly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c index 8c3a0e5d9b0..55904b96b4f 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1262,12 +1262,17 @@ read1 (readcharfun, pch, first_in_list) | |||
| 1262 | if (c == '"') | 1262 | if (c == '"') |
| 1263 | { | 1263 | { |
| 1264 | Lisp_Object tmp, val; | 1264 | Lisp_Object tmp, val; |
| 1265 | int size_in_chars = ((XFASTINT (length) + BITS_PER_CHAR) | 1265 | int size_in_chars = ((XFASTINT (length) + BITS_PER_CHAR - 1) |
| 1266 | / BITS_PER_CHAR); | 1266 | / BITS_PER_CHAR); |
| 1267 | 1267 | ||
| 1268 | UNREAD (c); | 1268 | UNREAD (c); |
| 1269 | tmp = read1 (readcharfun, pch, first_in_list); | 1269 | tmp = read1 (readcharfun, pch, first_in_list); |
| 1270 | if (size_in_chars != XSTRING (tmp)->size) | 1270 | if (size_in_chars != XSTRING (tmp)->size |
| 1271 | /* We used to print 1 char too many | ||
| 1272 | when the number of bits was a multiple of 8. | ||
| 1273 | Accept such input in case it came from an old version. */ | ||
| 1274 | && ! (XFASTINT (length) | ||
| 1275 | == (XSTRING (tmp)->size - 1) * BITS_PER_CHAR)) | ||
| 1271 | Fsignal (Qinvalid_read_syntax, | 1276 | Fsignal (Qinvalid_read_syntax, |
| 1272 | Fcons (make_string ("#&...", 5), Qnil)); | 1277 | Fcons (make_string ("#&...", 5), Qnil)); |
| 1273 | 1278 | ||