From 6929e541ddd21b211faa2b3817d0a763f0f31777 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 21 Apr 2014 05:30:14 +0200 Subject: [PATCH] Fix texture name issue with Vality's Bitter Coast Mod --- components/nifogre/material.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/nifogre/material.cpp b/components/nifogre/material.cpp index 4dae1a93de..3a87e1d529 100644 --- a/components/nifogre/material.cpp +++ b/components/nifogre/material.cpp @@ -67,6 +67,10 @@ std::string NIFMaterialLoader::findTextureName(const std::string &filename) std::string texname = filename; Misc::StringUtils::toLower(texname); + // Apparently, leading separators are allowed + while (texname.size() && (texname[0] == '/' || texname[0] == '\\')) + texname.erase(0, 1); + if(texname.compare(0, sizeof(path)-1, path) != 0 && texname.compare(0, sizeof(path2)-1, path2) != 0) texname = path + texname;