Explorar o código

- fix off-by-one error in FileSystemFilter.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1197 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg %!s(int64=13) %!d(string=hai) anos
pai
achega
accbcb575b
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      code/FileSystemFilter.h

+ 2 - 2
code/FileSystemFilter.h

@@ -213,12 +213,12 @@ private:
 					dirsep = in.rfind('\\', last_dirsep);
 				}
 
-				if (std::string::npos == dirsep) {
+				if (std::string::npos == dirsep || dirsep == 0) {
 					// we did try this already.
 					break;
 				}
 
-				last_dirsep = dirsep;
+				last_dirsep = dirsep-1;
 
 				tmp += in.substr(dirsep+1, in.length()-pos); 
 				if (wrapped->Exists(tmp)) {