From ac45e290f7550da70039c1d2051d7e6ed31cc7b7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 28 Aug 2006 13:34:15 +0000 Subject: Fixing other FS backends to use the bug fixed version of the POSIX lastPathComponent too (also lets the Windows FS use the POSIX version of lastPathComponent too, since it's nicer than the fix I made) svn-id: r23796 --- backends/fs/psp/psp_fs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backends/fs/psp') diff --git a/backends/fs/psp/psp_fs.cpp b/backends/fs/psp/psp_fs.cpp index 0ad98729a9..0f16ac8395 100644 --- a/backends/fs/psp/psp_fs.cpp +++ b/backends/fs/psp/psp_fs.cpp @@ -133,11 +133,11 @@ bool PSPFilesystemNode::listDir(AbstractFSList &myList, ListMode mode) const { } } -const char *lastPathComponent(const Common::String &str) { +static const char *lastPathComponent(const Common::String &str) { const char *start = str.c_str(); const char *cur = start + str.size() - 2; - while (cur > start && *cur != '/') { + while (cur >= start && *cur != '/') { --cur; } -- cgit v1.2.3