From 20df2d22341b155b1f65a25105237c652a1591c2 Mon Sep 17 00:00:00 2001 From: Steven Santana Date: Sat, 13 Jun 2020 04:22:10 -0400 Subject: [PATCH] Fix crash from examning vehicles with minireactors (#41222) --- src/item.cpp | 2 +- src/vehicle.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/item.cpp b/src/item.cpp index c95d718a636be..be761e4782e80 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -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; diff --git a/src/vehicle.cpp b/src/vehicle.cpp index d8d0332221c81..75d3ca2c8c8e0 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -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