Skip to content

Commit

Permalink
Fix crash from examning vehicles with minireactors (#41222)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nannaquin authored Jun 13, 2020
1 parent 349abcb commit 20df2d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7739,7 +7739,7 @@ bool item::reload( player &u, item_location ammo, int qty )

// any excess is wasted rather than overfilling the item
item plut( *ammo );
plut.charges = std::min( qty * PLUTONIUM_CHARGES, ammo_capacity( ammotype( "plut_cell" ) ) );
plut.charges = std::min( qty * PLUTONIUM_CHARGES, ammo_capacity( ammo_plutonium ) );
put_in( plut, item_pocket::pocket_type::MAGAZINE );
} else {
curammo = ammo->type;
Expand Down
2 changes: 1 addition & 1 deletion src/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ void vehicle::init_state( int init_veh_fuel, int init_veh_status )
}

if( pt.is_reactor() ) {
const ammotype plut( "plut_cell" );
const ammotype plut( "plutonium" );
if( veh_fuel_mult == 100 ) { // Mint condition vehicle
pt.ammo_set( itype_plut_cell );
} else if( one_in( 2 ) && veh_fuel_mult > 0 ) { // Randomize charge a bit
Expand Down

0 comments on commit 20df2d2

Please sign in to comment.