mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Fix dictionary text files parser failing on BOM marking (bug 5858, r=Nextra)
This commit is contained in:
parent
d09b92cf6c
commit
096464e3d5
@ -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