summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/README2
-rw-r--r--Build/source/texk/upmendex/ChangeLog4
-rw-r--r--Build/source/texk/upmendex/mendex.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/Build/source/texk/README b/Build/source/texk/README
index 726424538cb..82e9a99155f 100644
--- a/Build/source/texk/README
+++ b/Build/source/texk/README
@@ -106,7 +106,7 @@ ttf2pk2 - maintained here, by us
ttfdump - maintained here, by us, since Taiwan upstream apparently gone.
-upmendex 0.51 - by Takuji Tanaka
+upmendex 0.52 - by Takuji Tanaka
http://www.ctan.org/pkg/upmendex
http://www.t-lab.opal.ne.jp/tex/uptex_en.html
diff --git a/Build/source/texk/upmendex/ChangeLog b/Build/source/texk/upmendex/ChangeLog
index 51f4af3cc34..6e9e19eaa14 100644
--- a/Build/source/texk/upmendex/ChangeLog
+++ b/Build/source/texk/upmendex/ChangeLog
@@ -1,3 +1,7 @@
+2019-03-06 Hironobu Yamashita <h.y.acetaminophen@gmail.com>
+
+ Fix a bug in multibytelen().
+
2019-02-17 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* version 0.52 Beta version.
diff --git a/Build/source/texk/upmendex/mendex.h b/Build/source/texk/upmendex/mendex.h
index b2cda82aedf..a268727a7e3 100644
--- a/Build/source/texk/upmendex/mendex.h
+++ b/Build/source/texk/upmendex/mendex.h
@@ -90,7 +90,7 @@ void verb_printf(FILE *fp, const char *format, ...);
struct index;
void indwrite(char *filename, struct index *ind, int pagenum);
-#define multibytelen(a) ((a)<0xc2 ? 1 : ((a)<0xc2 ? -2 : ((a)<0xe0 ? 2 : ((a)<0xf0 ? 3 : ((a)<0xf5 ? 4 : -1)))))
+#define multibytelen(a) ((a)<0x80 ? 1 : ((a)<0xc2 ? -2 : ((a)<0xe0 ? 2 : ((a)<0xf0 ? 3 : ((a)<0xf5 ? 4 : -1)))))
#define is_surrogate_pair(a) (U16_IS_LEAD(*(a)) && U16_IS_TRAIL(*(a+1)))
#ifdef WIN32