diff --git a/src/item.cpp b/src/item.cpp index a8e235c1f21ae..f257737144099 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -8369,7 +8369,7 @@ bool item::use_amount( const itype_id &it, int &quantity, std::list &used, // Remember quantity so that we can unseal self int old_quantity = quantity; std::vector removed_items; - for( item *contained : contents.all_items_top() ) { + for( item *contained : contents.all_items_ptr( item_pocket::pocket_type::CONTAINER ) ) { if( contained->use_amount_internal( it, quantity, used, filter ) ) { removed_items.push_back( contained ); }