- fix off-by-one error in FileSystemFilter.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1197 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/5/head
aramis_acg 2012-03-11 20:04:35 +00:00
parent 2d7b59e134
commit accbcb575b
1 changed files with 2 additions and 2 deletions

View File

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