2
0
Эх сурвалжийг харах

Fix dir manipulation off by one error in Android DirExists() function. Closes #1470.

Lasse Öörni 9 жил өмнө
parent
commit
761afff122

+ 1 - 1
Source/Urho3D/IO/FileSystem.cpp

@@ -641,7 +641,7 @@ bool FileSystem::DirExists(const String& pathName) const
         unsigned pos = assetPath.FindLast('/', assetPath.Length() - 2);
         if (pos != String::NPOS)
         {
-            parentPath = assetPath.Substring(0, pos - 1);
+            parentPath = assetPath.Substring(0, pos);
             assetPath = assetPath.Substring(pos + 1);
         }
         assetPath.Resize(assetPath.Length() - 1);