Fix crash when loading an outdoors saved game

This commit is contained in:
2015-02-10 21:05:02 -05:00
parent 8d40d3d26a
commit 57a9a98178
2 changed files with 3 additions and 2 deletions

View File

@@ -2152,7 +2152,8 @@ void do_load() {
void post_load() {
current_switch = 6;
reset_item_max();
if(!is_out())
reset_item_max();
if(overall_mode == MODE_OUTDOORS)
update_explored(univ.party.p_loc);

View File

@@ -764,7 +764,7 @@ void place_glands(location where,mon_num_t m_type) {
}
void reset_item_max() {
while(univ.town.items.back().variety == eItemType::NO_ITEM)
while(!univ.town.items.empty() && univ.town.items.back().variety == eItemType::NO_ITEM)
univ.town.items.pop_back();
}