summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/ptexenc/ChangeLog4
-rw-r--r--Build/source/texk/ptexenc/ptexenc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/Build/source/texk/ptexenc/ChangeLog b/Build/source/texk/ptexenc/ChangeLog
index d95467445d6..0daf361f908 100644
--- a/Build/source/texk/ptexenc/ChangeLog
+++ b/Build/source/texk/ptexenc/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-25 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * ptexenc.c: Fix a bug, reported by N. Abe, in isUTF8Nstream().
+
2015-10-25 TANAKA Takuji <ttk@t-lab.opal.ne.jp>
* ptexenc.c: Enable composition of Hiragana, Katakana
diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c
index 3fce9aaaa1b..23b9ea4f052 100644
--- a/Build/source/texk/ptexenc/ptexenc.c
+++ b/Build/source/texk/ptexenc/ptexenc.c
@@ -744,7 +744,7 @@ static boolean isUTF8Nstream(FILE *fp)
for (i=0; i<MARK_LEN; i++) {
c[i] = getc4(fp);
if (!(bom_l[i] <= c[i] && c[i] <= bom_u[i])) {
- do { ungetc4(c[i], fp); } while (--i>0);
+ do { ungetc4(c[i], fp); } while (i-- > 0);
return false;
}
}