mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-02-16 02:30:44 +00:00
Strip bom encoding
This commit is contained in:
@@ -177,6 +177,10 @@ void LegitimacyCheck() {
|
|||||||
std::string contents((std::istreambuf_iterator(beamngIni)), std::istreambuf_iterator<char>());
|
std::string contents((std::istreambuf_iterator(beamngIni)), std::istreambuf_iterator<char>());
|
||||||
beamngIni.close();
|
beamngIni.close();
|
||||||
|
|
||||||
|
if (contents.size() >= 3 && (unsigned char)contents[0] == 0xEF && (unsigned char)contents[1] == 0xBB && (unsigned char)contents[2] == 0xBF) {
|
||||||
|
contents = contents.substr(3);
|
||||||
|
}
|
||||||
|
|
||||||
auto ini = Utils::ParseINI(contents);
|
auto ini = Utils::ParseINI(contents);
|
||||||
if (ini.empty())
|
if (ini.empty())
|
||||||
lowExit(3);
|
lowExit(3);
|
||||||
|
|||||||
Reference in New Issue
Block a user