mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 17:29:18 +02:00
add missing replace_slashes in parser
This commit is contained in:
@@ -246,7 +246,7 @@ std::string cParser::readToken( bool ToLower, const char *Break ) {
|
|||||||
// NOTE: parameter collecting uses default set of token separators.
|
// NOTE: parameter collecting uses default set of token separators.
|
||||||
if( expandIncludes && token == "include" ) {
|
if( expandIncludes && token == "include" ) {
|
||||||
std::string includefile = readToken(ToLower); // nazwa pliku
|
std::string includefile = readToken(ToLower); // nazwa pliku
|
||||||
std::replace(includefile.begin(), includefile.end(), '\\', '/');
|
replace_slashes(includefile);
|
||||||
if( ( true == LoadTraction )
|
if( ( true == LoadTraction )
|
||||||
|| ( ( false == contains( includefile, "tr/" ) )
|
|| ( ( false == contains( includefile, "tr/" ) )
|
||||||
&& ( false == contains( includefile, "tra/" ) ) ) ) {
|
&& ( false == contains( includefile, "tra/" ) ) ) ) {
|
||||||
@@ -269,6 +269,7 @@ std::string cParser::readToken( bool ToLower, const char *Break ) {
|
|||||||
// HACK: if the parser reads full lines we expect this line to contain entire include directive, to make parsing easier
|
// HACK: if the parser reads full lines we expect this line to contain entire include directive, to make parsing easier
|
||||||
cParser includeparser( token.substr( 7 ) );
|
cParser includeparser( token.substr( 7 ) );
|
||||||
std::string includefile = includeparser.readToken( ToLower ); // nazwa pliku
|
std::string includefile = includeparser.readToken( ToLower ); // nazwa pliku
|
||||||
|
replace_slashes(includefile);
|
||||||
if( ( true == LoadTraction )
|
if( ( true == LoadTraction )
|
||||||
|| ( ( false == contains( includefile, "tr/" ) )
|
|| ( ( false == contains( includefile, "tr/" ) )
|
||||||
&& ( false == contains( includefile, "tra/" ) ) ) ) {
|
&& ( false == contains( includefile, "tra/" ) ) ) ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user