diff options
Diffstat (limited to 'crawl-ref/source/files.cc')
-rw-r--r-- | crawl-ref/source/files.cc | 8 |
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. |