changeset 89996:d13df8a735d7

(read1): Fix reading of a char-table.
author Kenichi Handa <handa@m17n.org>
date Mon, 04 Oct 2004 01:19:02 +0000
parents 58db929d96c6
children c9046301e28b
files src/lread.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Mon Oct 04 01:04:18 2004 +0000
+++ b/src/lread.c	Mon Oct 04 01:19:02 2004 +0000
@@ -2084,7 +2084,7 @@
 	    {
 	      Lisp_Object tmp;
 	      tmp = read_vector (readcharfun, 0);
-	      if (XVECTOR (tmp)->size != VECSIZE (struct Lisp_Char_Table))
+	      if (XVECTOR (tmp)->size < VECSIZE (struct Lisp_Char_Table))
 		error ("Invalid size char-table");
 	      XSETCHAR_TABLE (tmp, XCHAR_TABLE (tmp));
 	      return tmp;
@@ -2103,7 +2103,7 @@
 		  depth = XINT (AREF (tmp, 0));
 		  if (depth < 1 || depth > 3)
 		    error ("Invalid depth in char-table");
-		  size = XVECTOR (tmp)->size + 2;
+		  size = XVECTOR (tmp)->size - 2;
 		  if (chartab_size [depth] != size)
 		    error ("Invalid size char-table");
 		  XSETSUB_CHAR_TABLE (tmp, XSUB_CHAR_TABLE (tmp));