mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 03:09:18 +02:00
build 200824. emergency_brake getvalues event support, utf bom parsing fix, brake state vehicle debug panel enhancement, ai cab change logic fixes, ai door operation logic fixes, minor ai logic fixes, gfx renderer framerate calculation tweak, minor bug fixes
This commit is contained in:
11
parser.cpp
11
parser.cpp
@@ -211,6 +211,17 @@ std::string cParser::readToken( bool ToLower, const char *Break ) {
|
||||
}
|
||||
} while( token == "" && mStream->peek() != EOF ); // double check in case of consecutive separators
|
||||
}
|
||||
// check the first token for potential presence of utf bom
|
||||
if( mFirstToken ) {
|
||||
mFirstToken = false;
|
||||
if( token.rfind( "\xef\xbb\xbf", 0 ) == 0 ) {
|
||||
token.erase( 0, 3 );
|
||||
}
|
||||
if( true == token.empty() ) {
|
||||
// potentially possible if our first token was standalone utf bom
|
||||
token = readToken( ToLower, Break );
|
||||
}
|
||||
}
|
||||
|
||||
if( false == parameters.empty() ) {
|
||||
// if there's parameter list, check the token for potential parameters to replace
|
||||
|
||||
Reference in New Issue
Block a user