Skip to content

Commit

Permalink
XML file detection: ignore BOM (#449)
Browse files Browse the repository at this point in the history
Fix loading EPUBs containing XML files starting
with the byte order mark (BOM).
  • Loading branch information
newinnovations authored Jul 23, 2021
1 parent d58a395 commit b20e771
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crengine/src/lvxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2910,7 +2910,7 @@ bool LVXMLParser::CheckFormat()
res = true;
// check that only whitespace chars before <
for ( int i=0; i<lt_pos && res; i++)
res = IsSpaceChar( chbuf[i] );
res = IsSpaceChar( chbuf[i] ) || chbuf[i] == 0xfeff;
}
}
}
Expand Down

0 comments on commit b20e771

Please sign in to comment.