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
1 changed files with 2 additions and 0 deletions

View File

@ -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:
{