summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-03-12 09:57:06 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-03-12 09:57:06 +0000
commitfaa1c65dc166f6fd5afcb3e4004fc6b33708b74b (patch)
tree6367b9f047396ffe7fc6b53676f15cfc7c08e9a0 /Build
parent4c3907cf6eb147400da138fd92e99e9b69c1bbf2 (diff)
texmfmp.c: Adopt Jonathan's fix for http://tug.org/pipermail/xetex/2017-January/026975.html
git-svn-id: svn://tug.org/texlive/trunk@43474 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c7
2 files changed, 8 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 53058e6a8c5..04e933d45a4 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,7 @@
+2017-03-12 Akira Kakuto <kakuto@fuk.kinidai.ac.jp>
+
+ * texmfmp.c: Adopt Jonathan's solution for the Change on 2017-02-01.
+
2017-02-13 Akira Kakuto <kakuto@fuk.kinidai.ac.jp>
* texmfmp.c: unsigned long long >= 0. Thanks Luigi.
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 152a2312e5a..c8b1dcc1b25 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -2818,9 +2818,10 @@ gettexstring (strnumber s)
unsigned bytesToWrite = 0;
poolpointer len, i, j;
string name;
- if (strstart[s + 1 - 65536L] < strstart[s - 65536L])
- return NULL;
- len = strstart[s + 1 - 65536L] - strstart[s - 65536L];
+ if (s >= 65536L)
+ len = strstart[s + 1 - 65536L] - strstart[s - 65536L];
+ else
+ len = 0;
name = xmalloc(len * 3 + 1); /* max UTF16->UTF8 expansion
(code units, not bytes) */
for (i = 0, j = 0; i < len; i++) {