some fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-19 14:01:50 -07:00
parent 8ae384e93f
commit a97bccbf38
17 changed files with 16 additions and 60 deletions
+2 -14
View File
@@ -1760,21 +1760,9 @@ XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString,
{
// not binary XML - refuse to load if in scripts dir and not in bin xml to help reduce hacking
// wish we could compile the text xml parser out, but too much work to get everything moved over
static const char SCRIPTS_DIR[] = "Scripts/";
AZStd::fixed_string<32> strScripts("S");
strScripts += "c";
strScripts += "r";
strScripts += "i";
strScripts += "p";
strScripts += "t";
strScripts += "s";
strScripts += "/";
AZStd::fixed_string<32> strScripts = {"Scripts/"};
// exclude files and PAKs from Mods folder
AZStd::fixed_string<8> modsStr("M");
modsStr += "o";
modsStr += "d";
modsStr += "s";
modsStr += "/";
AZStd::fixed_string<8> modsStr = {"Mods/"};
if (_strnicmp(filename, strScripts.c_str(), strScripts.length()) == 0 &&
_strnicmp(adjustedFilename.c_str(), modsStr.c_str(), modsStr.length()) != 0 &&
_strnicmp(pakPath.c_str(), modsStr.c_str(), modsStr.length()) != 0)