From 83d6a0f14d609aaff873b253433a5dec00e3a11d Mon Sep 17 00:00:00 2001 From: Takuji Tanaka Date: Sun, 6 May 2018 11:16:15 +0000 Subject: ptexdir: More strict check kanji token git-svn-id: svn://tug.org/texlive/trunk@47626 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ptexdir/ChangeLog | 4 ++++ Build/source/texk/web2c/ptexdir/kanji.c | 4 +++- Build/source/texk/web2c/uptexdir/kanji.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/ptexdir/ChangeLog b/Build/source/texk/web2c/ptexdir/ChangeLog index cc07b4c3372..a754ccc6f24 100644 --- a/Build/source/texk/web2c/ptexdir/ChangeLog +++ b/Build/source/texk/web2c/ptexdir/ChangeLog @@ -1,3 +1,7 @@ +2018-05-06 Hironori Kitagawa + + * kanji.c: More strict check kanji token. + 2018-04-14 Hironori Kitagawa * ptex-base.ch: Fix issue GitHub:texjporg/tex-jp-build#57 diff --git a/Build/source/texk/web2c/ptexdir/kanji.c b/Build/source/texk/web2c/ptexdir/kanji.c index d7e5a3f26be..5cd9ebabe02 100644 --- a/Build/source/texk/web2c/ptexdir/kanji.c +++ b/Build/source/texk/web2c/ptexdir/kanji.c @@ -4,6 +4,7 @@ */ #include "kanji.h" +#define CS_TOKEN_FLAG 0xFFFF #if !defined(WIN32) int sjisterminal; @@ -12,7 +13,8 @@ int sjisterminal; /* TOKEN */ boolean check_kanji(integer c) { - return is_char_kanji(c); + if (c >= CS_TOKEN_FLAG) return false; + else return is_char_kanji(c); } boolean is_char_ascii(integer c) diff --git a/Build/source/texk/web2c/uptexdir/kanji.c b/Build/source/texk/web2c/uptexdir/kanji.c index 70c2e21a2d1..dcb202089c7 100644 --- a/Build/source/texk/web2c/uptexdir/kanji.c +++ b/Build/source/texk/web2c/uptexdir/kanji.c @@ -18,7 +18,7 @@ int sjisterminal; /* TOKEN */ boolean check_kanji (integer c) { - if (c > CS_TOKEN_FLAG) return false; + if (c >= CS_TOKEN_FLAG) return false; else if (!(XXHi(c)>=KCAT_KANJI && XXHi(c)<=KCAT_HANGUL)) return false; else return is_char_kanji(c); } -- cgit v1.2.3