From 970b7474fdab337fc60d2db09fc18b125a5b0e6c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 22 Jul 2002 12:28:14 +0000 Subject: [PATCH] (Fmap_charset_chars): Fix handling of default value for FROM_CODE and TO_CODE. --- src/charset.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/charset.c b/src/charset.c index c4ec97b2a65..d698f76017d 100644 --- a/src/charset.c +++ b/src/charset.c @@ -670,18 +670,23 @@ range of code points of targer characters. */) CHECK_CHARSET_GET_CHARSET (charset, cs); if (NILP (from_code)) - from_code = make_number (0); - CHECK_NATNUM (from_code); - from = XINT (from_code); - if (from < CHARSET_MIN_CODE (cs)) from = CHARSET_MIN_CODE (cs); + else + { + CHECK_NATNUM (from_code); + from = XINT (from_code); + if (from < CHARSET_MIN_CODE (cs)) + from = CHARSET_MIN_CODE (cs); + } if (NILP (to_code)) - to_code = make_number (0xFFFFFFFF); - CHECK_NATNUM (from_code); - to = XINT (to_code); - if (to > CHARSET_MAX_CODE (cs)) - to_code = make_number (CHARSET_MAX_CODE (cs)); - + to = CHARSET_MAX_CODE (cs); + else + { + CHECK_NATNUM (to_code); + to = XINT (to_code); + if (to > CHARSET_MAX_CODE (cs)) + to = CHARSET_MAX_CODE (cs); + } map_charset_chars (NULL, function, arg, cs, from, to); return Qnil; } -- 2.39.2