Selaa lähdekoodia

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

Lasse Öörni 9 vuotta sitten
vanhempi
sitoutus
761afff122
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      Source/Urho3D/IO/FileSystem.cpp

+ 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);