diff --git a/src/math_parser_diag.cpp b/src/math_parser_diag.cpp index 9c72fe8d677d7..142a659be845b 100644 --- a/src/math_parser_diag.cpp +++ b/src/math_parser_diag.cpp @@ -274,7 +274,7 @@ diag_eval_dbl_f faction_food_supply_eval( char /* scope */, return [fac_val = params[0], vit_val]( const_dialogue const & d ) { faction *fac = g->faction_manager_ptr->get( faction_id( fac_val.str( d ) ) ); if( !vit_val.is_empty() ) { - return static_cast( fac->food_supply.get_vitamin( vitamin_id( vit_val.str() ) ) ); + return static_cast( fac->food_supply.get_vitamin( vitamin_id( vit_val.str( d ) ) ) ); } return static_cast( fac->food_supply.calories ); }; @@ -287,7 +287,7 @@ diag_assign_dbl_f faction_food_supply_ass( char /* scope */, return [fac_val = params[0], vit_val]( dialogue const & d, double val ) { faction *fac = g->faction_manager_ptr->get( faction_id( fac_val.str( d ) ) ); if( !vit_val.is_empty() ) { - fac->food_supply.add_vitamin( vitamin_id( vit_val.str() ), val ); + fac->food_supply.add_vitamin( vitamin_id( vit_val.str( d ) ), val ); return; } fac->food_supply.calories = val;