summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
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;