summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakuji Tanaka <KXD02663@nifty.ne.jp>2018-05-06 11:16:15 +0000
committerTakuji Tanaka <KXD02663@nifty.ne.jp>2018-05-06 11:16:15 +0000
commit83d6a0f14d609aaff873b253433a5dec00e3a11d (patch)
tree3ab56ab23fe005df11ed5574dea191d518a2bad9
parenta9d5c24fa0b29244fc0e8c723fac6bb4447060cf (diff)
ptexdir: More strict check kanji token
git-svn-id: svn://tug.org/texlive/trunk@47626 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/ptexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/ptexdir/kanji.c4
-rw-r--r--Build/source/texk/web2c/uptexdir/kanji.c2
3 files changed, 8 insertions, 2 deletions
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 <h_kitagawa2001@yahoo.co.jp>
+
+ * kanji.c: More strict check kanji token.
+
2018-04-14 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
* 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);
}