From 71b6b1d375ea617a5ca3057063ea76e97dbfbd8f Mon Sep 17 00:00:00 2001 From: dolorous Date: Sat, 25 Jul 2009 21:01:38 +0000 Subject: Apply kotk's minor fixes patch in [2827129], with minor tweaks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10409 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/files.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/files.cc') diff --git a/crawl-ref/source/files.cc b/crawl-ref/source/files.cc index 5ab9bb330f..67bf806c93 100644 --- a/crawl-ref/source/files.cc +++ b/crawl-ref/source/files.cc @@ -672,14 +672,14 @@ std::vector find_saved_characters() for (unsigned int i = 0; i < allfiles.size(); ++i) { std::string filename = allfiles[i]; + + std::string::size_type point_pos = filename.find_last_of('.'); + std::string basename = filename.substr(0, point_pos); + #ifdef LOAD_UNPACKAGE_CMD if (!is_packed_save(filename)) continue; - std::string basename = - filename.substr(0, - filename.length() - strlen(PACKAGE_SUFFIX)); - const std::string zipname = get_savedir_path(basename); // This is the filename we actually read ourselves. -- cgit v1.2.3-54-g00ecf