diff --git a/src/item_group.cpp b/src/item_group.cpp index ddfaa377a1ae1..10bb167b12919 100644 --- a/src/item_group.cpp +++ b/src/item_group.cpp @@ -378,6 +378,7 @@ void Item_modifier::modify( item &new_item ) const if( !cont.is_null() ) { cont.put_in( new_item, item_pocket::pocket_type::CONTAINER ); + cont.seal(); new_item = cont; } @@ -386,6 +387,7 @@ void Item_modifier::modify( item &new_item ) const for( const item &it : contentitems ) { new_item.put_in( it, item_pocket::pocket_type::CONTAINER ); } + new_item.seal(); } for( auto &flag : custom_flags ) { diff --git a/src/item_pocket.cpp b/src/item_pocket.cpp index af3f0d59c0f7a..f248ff08fb57a 100644 --- a/src/item_pocket.cpp +++ b/src/item_pocket.cpp @@ -1129,7 +1129,7 @@ void item_pocket::on_pickup( Character &guy ) void item_pocket::on_contents_changed() { - _sealed = false; + unseal(); restack(); }