aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2004-10-04 01:19:02 +0000
committerKenichi Handa2004-10-04 01:19:02 +0000
commit41482d3650c49e1dc1333e49a7fcc226fe6fa29c (patch)
treea54904ce41fdfc685d0afff8a705504f2f75f64d
parentd3857d85ab7e18b5dafdb6395e811bb566f8184b (diff)
downloademacs-41482d3650c49e1dc1333e49a7fcc226fe6fa29c.tar.gz
emacs-41482d3650c49e1dc1333e49a7fcc226fe6fa29c.zip
(read1): Fix reading of a char-table.
-rw-r--r--src/lread.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c
index d3014eb7eb6..0634a4c7c30 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2084,7 +2084,7 @@ read1 (readcharfun, pch, first_in_list)
2084 { 2084 {
2085 Lisp_Object tmp; 2085 Lisp_Object tmp;
2086 tmp = read_vector (readcharfun, 0); 2086 tmp = read_vector (readcharfun, 0);
2087 if (XVECTOR (tmp)->size != VECSIZE (struct Lisp_Char_Table)) 2087 if (XVECTOR (tmp)->size < VECSIZE (struct Lisp_Char_Table))
2088 error ("Invalid size char-table"); 2088 error ("Invalid size char-table");
2089 XSETCHAR_TABLE (tmp, XCHAR_TABLE (tmp)); 2089 XSETCHAR_TABLE (tmp, XCHAR_TABLE (tmp));
2090 return tmp; 2090 return tmp;
@@ -2103,7 +2103,7 @@ read1 (readcharfun, pch, first_in_list)
2103 depth = XINT (AREF (tmp, 0)); 2103 depth = XINT (AREF (tmp, 0));
2104 if (depth < 1 || depth > 3) 2104 if (depth < 1 || depth > 3)
2105 error ("Invalid depth in char-table"); 2105 error ("Invalid depth in char-table");
2106 size = XVECTOR (tmp)->size + 2; 2106 size = XVECTOR (tmp)->size - 2;
2107 if (chartab_size [depth] != size) 2107 if (chartab_size [depth] != size)
2108 error ("Invalid size char-table"); 2108 error ("Invalid size char-table");
2109 XSETSUB_CHAR_TABLE (tmp, XSUB_CHAR_TABLE (tmp)); 2109 XSETSUB_CHAR_TABLE (tmp, XSUB_CHAR_TABLE (tmp));