Skip to content

Commit

Permalink
fix: Corrects charges draining from forges (cataclysmbnteam#5461)
Browse files Browse the repository at this point in the history
* Corrects charges draining from forges

* Remove used capture
  • Loading branch information
joveeater authored Sep 29, 2024
1 parent 5fe352a commit a0a4346
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5109,9 +5109,9 @@ static void use_charges_from_furn( const furn_t &f, const itype_id &type, int &q
} );
if( iter != stack.end() ) {

( *iter )->attempt_detach( [&filter, &type, &quantity, &ret, &p]( detached_ptr<item> &&it ) {
( *iter )->attempt_detach( [&filter, &ammo, &quantity, &ret, &p]( detached_ptr<item> &&it ) {
if( filter( *it ) ) {
return item::use_charges( std::move( it ), type, quantity, ret, p );
return item::use_charges( std::move( it ), ammo, quantity, ret, p );
}
return std::move( it );
} );
Expand Down

0 comments on commit a0a4346

Please sign in to comment.