changeset 23721:e593fb9c68c3

(CHAR_TABLE_REF): Check if IDX is negative or not.
author Kenichi Handa <handa@m17n.org>
date Mon, 16 Nov 1998 06:26:27 +0000
parents 3371f3bd2057
children b0c66c87b29b
files src/lisp.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lisp.h	Mon Nov 16 06:26:27 1998 +0000
+++ b/src/lisp.h	Mon Nov 16 06:26:27 1998 +0000
@@ -641,7 +641,7 @@
    and 8-bit Europeans characters.  For these characters, do not check
    validity of CT.  Do not follow parent.  */
 #define CHAR_TABLE_REF(CT, IDX)				\
-  ((IDX) < CHAR_TABLE_SINGLE_BYTE_SLOTS			\
+  ((IDX) >= 0 && (IDX) < CHAR_TABLE_SINGLE_BYTE_SLOTS	\
    ? (!NILP (XCHAR_TABLE (CT)->contents[IDX])		\
       ? XCHAR_TABLE (CT)->contents[IDX]			\
       : XCHAR_TABLE (CT)->defalt)			\