From 1c52d17a4dc27b16ad16b239310ec3947da14746 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 17 Nov 2009 02:37:29 +0000 Subject: [PATCH] get_bom should consider the case the file is empty. --- C/iopreds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C/iopreds.c b/C/iopreds.c index 5dfcdc198..da4a75f97 100755 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -2160,6 +2160,8 @@ check_bom(int sno, StreamDesc *st) int ch; ch = st->stream_getc(sno); + if (ch == EOFCHAR) + return TRUE; switch(ch) { case 0xFE: {