summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorTakuji Tanaka <ttk@t-lab.opal.ne.jp>2020-05-10 00:22:44 +0000
committerTakuji Tanaka <ttk@t-lab.opal.ne.jp>2020-05-10 00:22:44 +0000
commitd271db7489dd195b0ca0dbf4362a29b51468cbfa (patch)
tree5dfac191d493f62db52ff1acf37833e70e276783 /Build
parent934b758db4a9cd304fc4c95b84299eec5497dc4a (diff)
ptexenc: Fix a bug of end of line in input_line2()
git-svn-id: svn://tug.org/texlive/trunk@55082 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/ptexenc/ChangeLog5
-rw-r--r--Build/source/texk/ptexenc/ptexenc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/Build/source/texk/ptexenc/ChangeLog b/Build/source/texk/ptexenc/ChangeLog
index 2d5aebd94a4..953451e369f 100644
--- a/Build/source/texk/ptexenc/ChangeLog
+++ b/Build/source/texk/ptexenc/ChangeLog
@@ -1,3 +1,8 @@
+2020-05-10 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * ptexenc.c: Fix a bug of end of line in input_line2().
+ https://github.com/texjporg/tex-jp-build/issues/100
+
2020-04-10 Karl Berry <karl@tug.org>
* version.ac: now 1.3.9/dev since TL'19 is released.
diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c
index 8f3ef315866..91cb4fa6f5a 100644
--- a/Build/source/texk/ptexenc/ptexenc.c
+++ b/Build/source/texk/ptexenc/ptexenc.c
@@ -822,7 +822,7 @@ long input_line2(FILE *fp, unsigned char *buff, long pos,
}
}
- buffer[last] = '\0';
+ if (i != EOF || first != last) buffer[last] = '\0';
if (i == EOF || i == '\n' || i == '\r') injis = false;
if (lastchar != NULL) *lastchar = i;