diff --git a/src/backend/graph.cpp b/src/backend/graph.cpp index c4779110..e8808dca 100644 --- a/src/backend/graph.cpp +++ b/src/backend/graph.cpp @@ -108,16 +108,8 @@ namespace boss { } void AddNonOverlapEdges(PluginGraph& graph) { - //First find the position of the first non-master. - boss::vertex_it vitFirstNonMaster, vit, vitend; - for (boost::tie(vit, vitend) = boost::vertices(graph); vit != vitend; ++vit) { - if (!graph[*vit].IsMaster()) { - vitFirstNonMaster = vit; - break; - } - } - - //Now add edges for all relationships that aren't overlaps. + //Add edges for all relationships that aren't overlaps. + boss::vertex_it vit, vitend; for (boost::tie(vit, vitend) = boost::vertices(graph); vit != vitend; ++vit) { vertex_t parentVertex; diff --git a/src/backend/metadata.cpp b/src/backend/metadata.cpp index 6cee6d4e..2b0f3f74 100644 --- a/src/backend/metadata.cpp +++ b/src/backend/metadata.cpp @@ -84,11 +84,11 @@ namespace boss { } bool ConditionStruct::EvalCondition(boss::Game& game) const { - BOOST_LOG_TRIVIAL(trace) << "Evaluating condition: " << _condition; - if (_condition.empty()) return true; + BOOST_LOG_TRIVIAL(trace) << "Evaluating condition: " << _condition; + boost::unordered_map::const_iterator it = game.conditionCache.find(boost::to_lower_copy(_condition)); if (it != game.conditionCache.end()) return it->second; @@ -276,9 +276,10 @@ namespace boss { file = new espm::fonv::File(filepath, game.espm_settings, false, headerOnly); //If the name passed ends in '.ghost', that should be trimmed. - BOOST_LOG_TRIVIAL(trace) << "Trimming '.ghost' extension."; - if (boost::iends_with(name, ".ghost")) + if (boost::iends_with(name, ".ghost")) { + BOOST_LOG_TRIVIAL(trace) << "Trimming '.ghost' extension."; name = name.substr(0, name.length() - 6); + } BOOST_LOG_TRIVIAL(trace) << "Checking to see if plugin is a master or not."; isMaster = file->isMaster(game.espm_settings); @@ -286,6 +287,8 @@ namespace boss { BOOST_LOG_TRIVIAL(trace) << "Getting the plugin's masters."; masters = file->getMasters(); + BOOST_LOG_TRIVIAL(trace) << "Number of masters: " << masters.size(); + crc = file->crc; game.crcCache.insert(pair(n, crc)); @@ -328,7 +331,7 @@ namespace boss { BOOST_LOG_TRIVIAL(trace) << "Attempting to extract Bash Tags from the description."; size_t pos1 = text.find("{{BASH:"); - if (pos1 == string::npos) + if (pos1 == string::npos || pos1 + 7 == text.length()) return; pos1 += 7; diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 43e6cd09..237fba06 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -317,6 +317,7 @@ bool BossGUI::OnInit() { return false; } } + BOOST_LOG_TRIVIAL(debug) << "Game selected is " << _game.Name(); //Now that game is selected, initialise it. BOOST_LOG_TRIVIAL(debug) << "Initialising game-specific settings.";