summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-03-05 15:53:53 -0700
committerSteve Melenchuk <smelenchuk@gmail.com>2014-03-05 15:53:53 -0700
commit352617427b2466bc13e13a4bbab236f5afb79f43 (patch)
treee7c132f11ff8bb4c8c7b40a6d7b2e568ed2910f9 /crawl-ref/source/mapdef.cc
parentd1872aa6dd455cb281993a2fa20c4961564a62cd (diff)
downloadcrawl-ref-352617427b2466bc13e13a4bbab236f5afb79f43.tar.gz
crawl-ref-352617427b2466bc13e13a4bbab236f5afb79f43.zip
Handle errors in shop specs with item lists a bit more gracefully.
If there was an item list and a problem with the rest of the shop spec, it generated a valid shop spec without errors (assuming there were none in the item list) with shop type -1. This cropped up in grated_community_mu (which is about to be fixed).
Diffstat (limited to 'crawl-ref/source/mapdef.cc')
-rw-r--r--crawl-ref/source/mapdef.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index dfbeb59af6..cd2a9bcc72 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -5883,7 +5883,7 @@ feature_spec keyed_mapspec::parse_shop(string s, int weight, int mimic,
err = make_stringf("too many semi-colons for '%s' spec", orig.c_str());
item_list items;
- if (parts.size() == 2)
+ if (err.empty() && parts.size() == 2)
{
string item_list = parts[1];
vector<string> str_items = split_string("|", item_list);