changeset 102899:5ebc155eeeed

(map_charset_chars): For a charset of `superset' method, fix calculation of code range.
author Kenichi Handa <handa@m17n.org>
date Thu, 09 Apr 2009 03:47:31 +0000
parents 62b8c5608b1d
children 900dbd393c86
files src/charset.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/charset.c	Thu Apr 09 02:40:51 2009 +0000
+++ b/src/charset.c	Thu Apr 09 03:47:31 2009 +0000
@@ -809,8 +809,8 @@
 
 	  charset = CHARSET_FROM_ID (XFASTINT (XCAR (XCAR (parents))));
 	  offset = XINT (XCDR (XCAR (parents)));
-	  this_from = from - offset;
-	  this_to = to - offset;
+	  this_from = from > offset ? from - offset : 0;
+	  this_to = to > offset ? to - offset : 0;
 	  if (this_from < CHARSET_MIN_CODE (charset))
 	    this_from = CHARSET_MIN_CODE (charset);
 	  if (this_to > CHARSET_MAX_CODE (charset))