diff options
Diffstat (limited to 'crawl-ref/source/shopping.cc')
-rw-r--r-- | crawl-ref/source/shopping.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 74b15d0ed7..b42432c843 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -2405,12 +2405,15 @@ void ShoppingList::move_things(const coord_def &_src, const coord_def &_dst) void ShoppingList::forget_pos(const level_pos &pos) { - for (unsigned int i = (list->size() - 1); i>= 0; i--) + for (unsigned int i = 0; i < list->size(); i++) { const CrawlHashTable &thing = (*list)[i]; if (thing_pos(thing) == pos) + { list->erase(i); + i--; + } } } |