summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/xetexdir/XeTeX_ext.c')
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeX_ext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
index 7efebad0506..da3bf2f1e64 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
+++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c
@@ -374,7 +374,7 @@ static UInt32 *utf32Buf = NULL;
while (bytesRead < bufsize && (i = getc(f->f)) != EOF && i != '\n' && i != '\r')
byteBuffer[bytesRead++] = i;
- if (i == EOF && errno != EINTR && last == first)
+ if (i == EOF && errno != EINTR && bytesRead == 0)
return false;
if (i != EOF && i != '\n' && i != '\r')
@@ -432,7 +432,7 @@ static UInt32 *utf32Buf = NULL;
while (tmpLen < bufsize && (i = get_uni_c(f)) != EOF && i != '\n' && i != '\r')
utf32Buf[tmpLen++] = i;
- if (i == EOF && errno != EINTR && last == first)
+ if (i == EOF && errno != EINTR && tmpLen == 0)
return false;
/* We didn't get the whole line because our buffer was too small. */