get_bom should consider the case the file is empty.

This commit is contained in:
Vitor Santos Costa 2009-11-17 02:37:29 +00:00
parent 7b85efff0c
commit 1c52d17a4d

View File

@ -2160,6 +2160,8 @@ check_bom(int sno, StreamDesc *st)
int ch; int ch;
ch = st->stream_getc(sno); ch = st->stream_getc(sno);
if (ch == EOFCHAR)
return TRUE;
switch(ch) { switch(ch) {
case 0xFE: case 0xFE:
{ {