summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/files.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 21:01:38 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-07-25 21:01:38 +0000
commit71b6b1d375ea617a5ca3057063ea76e97dbfbd8f (patch)
tree903d9e5054416840c24a7a79d6a0efaf86287f8b /crawl-ref/source/files.cc
parent4b16c906a2ed48ff8a4ae682ad2e6c9615d3fe1b (diff)
downloadcrawl-ref-71b6b1d375ea617a5ca3057063ea76e97dbfbd8f.tar.gz
crawl-ref-71b6b1d375ea617a5ca3057063ea76e97dbfbd8f.zip
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
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r--crawl-ref/source/files.cc8
1 files changed, 4 insertions, 4 deletions
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<player_save_info> 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.