From accbcb575bf1eac119aaf5b8f7d184839f395825 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sun, 11 Mar 2012 20:04:35 +0000 Subject: [PATCH] - fix off-by-one error in FileSystemFilter. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1197 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/FileSystemFilter.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/FileSystemFilter.h b/code/FileSystemFilter.h index cc8e625ab..517009028 100644 --- a/code/FileSystemFilter.h +++ b/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)) {