summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/travel.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 07:19:04 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 07:19:04 +0000
commitae735f39601423c88be471340dfe88dc3d3d103d (patch)
tree6c70a5c28e9bb8202846737217ede5c0eaed2c13 /crawl-ref/source/travel.cc
parentdf2a542d658cebfc151aff61d42abafd82de60c2 (diff)
downloadcrawl-ref-ae735f39601423c88be471340dfe88dc3d3d103d.tar.gz
crawl-ref-ae735f39601423c88be471340dfe88dc3d3d103d.zip
Fix 2017893: long file names not working on DOS. Crawl now takes a
shot at abbreviating them, and only fails if it can't find that file either. Handles all files included by default in /settings and /docs except changes.stone_soup which is not strictly necessary for the version information. Tested artificially by manually mutilating the file names; not actually tested on DOS. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6578 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/travel.cc')
-rw-r--r--crawl-ref/source/travel.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/crawl-ref/source/travel.cc b/crawl-ref/source/travel.cc
index 680c66f191..da2685d2e0 100644
--- a/crawl-ref/source/travel.cc
+++ b/crawl-ref/source/travel.cc
@@ -2238,7 +2238,7 @@ static travel_target _parse_travel_target( std::string s, travel_target &targ )
std::string::size_type epos = s.find(ekey);
if (!s.empty())
- targ.entrance_only = epos != std::string::npos;
+ targ.entrance_only = (epos != std::string::npos);
if (targ.entrance_only && !s.empty())
s = trimmed_string(s.substr(0, epos) + s.substr(epos + ekey.length()));
@@ -2255,8 +2255,7 @@ static travel_target _parse_travel_target( std::string s, travel_target &targ )
return (targ);
}
-static void _travel_depth_munge(int munge_method,
- const std::string &s,
+static void _travel_depth_munge(int munge_method, const std::string &s,
travel_target &targ)
{
_parse_travel_target(s, targ);