diff --git a/src/advanced_inv.cpp b/src/advanced_inv.cpp index fd7016c3e0719..ad92a4cfbd93c 100644 --- a/src/advanced_inv.cpp +++ b/src/advanced_inv.cpp @@ -820,7 +820,7 @@ bool advanced_inventory::move_all_items( bool nested_call ) // Check some preconditions to quickly leave the function. size_t liquid_items = 0; - for( const advanced_inv_listitem elem : spane.items ) { + for( const advanced_inv_listitem &elem : spane.items ) { for( const item *elemit : elem.items ) { if( elemit->made_of_from_type( LIQUID ) && !elemit->is_frozen_liquid() ) { liquid_items++;