mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Fix correctActorModelPath to work properly when both backward and forward slashes are used in the path (Fixes #3822)
This commit is contained in:
parent
9d5c46027d
commit
c962b6dd6d
@ -127,9 +127,7 @@ std::string Misc::ResourceHelpers::correctBookartPath(const std::string &resPath
|
||||
std::string Misc::ResourceHelpers::correctActorModelPath(const std::string &resPath, const VFS::Manager* vfs)
|
||||
{
|
||||
std::string mdlname = resPath;
|
||||
std::string::size_type p = mdlname.rfind('\\');
|
||||
if(p == std::string::npos)
|
||||
p = mdlname.rfind('/');
|
||||
std::string::size_type p = mdlname.find_last_of("/\\");
|
||||
if(p != std::string::npos)
|
||||
mdlname.insert(mdlname.begin()+p+1, 'x');
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user