diff --git a/code/AssetLib/Collada/ColladaParser.cpp b/code/AssetLib/Collada/ColladaParser.cpp index 47d96ff94..52e9b4978 100644 --- a/code/AssetLib/Collada/ColladaParser.cpp +++ b/code/AssetLib/Collada/ColladaParser.cpp @@ -2058,7 +2058,7 @@ void ColladaParser::ReadSceneNode(XmlNode &node, Node *pNode) { XmlParser::getStdStrAttribute(currentNode, "id", child->mID); } if (XmlParser::hasAttribute(currentNode, "sid")) { - XmlParser::getStdStrAttribute(currentNode, "id", child->mSID); + XmlParser::getStdStrAttribute(currentNode, "sid", child->mSID); } if (XmlParser::hasAttribute(currentNode, "name")) { XmlParser::getStdStrAttribute(currentNode, "name", child->mName); diff --git a/code/AssetLib/LWS/LWSLoader.cpp b/code/AssetLib/LWS/LWSLoader.cpp index 951dbe180..abaaaa305 100644 --- a/code/AssetLib/LWS/LWSLoader.cpp +++ b/code/AssetLib/LWS/LWSLoader.cpp @@ -313,6 +313,9 @@ void LWSImporter::SetupNodeName(aiNode *nd, LWS::NodeDesc &src) { std::string::size_type t = src.path.substr(s).find_last_of('.'); nd->mName.length = ::ai_snprintf(nd->mName.data, MAXLEN, "%s_(%08X)", src.path.substr(s).substr(0, t).c_str(), combined); + if (nd->mName.length > MAXLEN) { + nd->mName.length = MAXLEN; + } return; } } diff --git a/tools/assimp_cmd/assimp_cmd.rc b/tools/assimp_cmd/assimp_cmd.rc index 94572b7e0..2ead81bcb 100644 --- a/tools/assimp_cmd/assimp_cmd.rc +++ b/tools/assimp_cmd/assimp_cmd.rc @@ -1,5 +1,9 @@ #include "revision.h" -#include "winres.h" +#if defined(__GNUC__) && defined(_WIN32) + #include "winresrc.h" +#else + #include "winres.h" +#endif LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252)