Commit fc004d68 authored by VAN TOLL Wouter's avatar VAN TOLL Wouter

Bugfix in xmp parser

parent 12830087
......@@ -66,7 +66,7 @@ void XMLParser::loadMasterConfig(const std::string &filename, World * world){
// Location of the config file should be relative to the location of the *main* config file.
// Check if the main config file lies in a subfolder.
auto endOfPath = filename.find_last_of('/');
std::string mainPath = (endOfPath < 0 ? "" : filename.substr(0, endOfPath));
std::string mainPath = (endOfPath == std::string::npos ? "" : filename.substr(0, endOfPath));
load(mainPath + simConfigPathElt->Attribute("path"), world);
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment