Commit bb5627cf authored by bitplane's avatar bitplane

Fix for getFileBasename, submitted by Reaper

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2607 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 33a18192
...@@ -502,8 +502,8 @@ core::string<c16> CFileSystem::getFileBasename(const core::string<c16>& filename ...@@ -502,8 +502,8 @@ core::string<c16> CFileSystem::getFileBasename(const core::string<c16>& filename
{ {
// take care to search only after last slash to check only for // take care to search only after last slash to check only for
// dots in the filename // dots in the filename
end = filename.findLast('.', lastSlash); end = filename.findLast('.');
if (end == -1) if (end == -1 || end < lastSlash)
end=0; end=0;
else else
end = filename.size()-end; end = filename.size()-end;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment