diff options
Diffstat (limited to 'Build/source/texk/web2c/lib/texmfmp.c')
-rw-r--r-- | Build/source/texk/web2c/lib/texmfmp.c | 7 |
1 files changed, 4 insertions, 3 deletions
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++) { |