Skip to content

Commit

Permalink
Fixed log entry for PatchFileXX options
Browse files Browse the repository at this point in the history
(also allow using ".\\", as it cannot escape the game folder.)
  • Loading branch information
NovaRain committed Jan 11, 2024
1 parent bfbbc33 commit 9e4ac57
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sfall/Modules/LoadOrder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ static bool NormalizePath(std::string &path) {
path.erase(0, path.find_first_not_of('\\'));

// Disallow paths trying to "escape" game folder:
if (path.find(':') != std::string::npos ||
path.find(".\\") != std::string::npos ||
path.find("..\\") != std::string::npos) {
if (path.find(':') != std::string::npos || path.find("..\\") != std::string::npos) {
return false;
}
return !path.empty();
Expand Down Expand Up @@ -324,7 +322,7 @@ static void GetExtraPatches() {
for (int i = 0; i < 100; i++) {
_itoa(i, &patchFile[9], 10);
auto patch = IniReader::GetConfigString("ExtraPatches", patchFile, "");
if (!ValidateExtraPatch(patch, "", patchFile)) continue;
if (!ValidateExtraPatch(patch, ".\\", patchFile)) continue;
patchFiles.push_back(patch);
}
const std::string modsPath = ".\\mods\\";
Expand Down

0 comments on commit 9e4ac57

Please sign in to comment.