Fix dictionary text files parser failing on BOM marking (bug 5858, r=Nextra)
Former-commit-id: 096464e3d5852cde0d91fe407598c970c5495dce
This commit is contained in:
parent
784f91e441
commit
6139d52a39
@ -393,6 +393,14 @@ int CLangMngr::MergeDefinitionFile(const char *file)
|
||||
if ((buf[0] == ';') || (buf[0] == '/' && buf[1] == '/'))
|
||||
continue;
|
||||
|
||||
/* Check for BOM markings, which is only relevant on the first line.
|
||||
* Not worth it, but it could be moved out of the loop.
|
||||
*/
|
||||
if (line == 1 && (buf[0] == (char)0xEF && buf[1] == (char)0xBB && buf[2] == (char)0xBF))
|
||||
{
|
||||
buf.erase(0, 3);
|
||||
}
|
||||
|
||||
if (buf[0] == '[' && buf.size() >= 3)
|
||||
{
|
||||
if (multiline)
|
||||
|
Loading…
Reference in New Issue
Block a user