Skip to content

Commit

Permalink
No mandatory member
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed Apr 6, 2024
1 parent 4c0030c commit b5d7d84
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/npctalk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ struct item_search_data {
id = itype_id( jo.get_string( "id", "" ) );
category = item_category_id( jo.get_string( "category", "" ) );
material = material_id( jo.get_string( "material", "" ) );
calories = jo.get_int( "calories" );
if( jo.has_int( "calories" ) ) {
calories = jo.get_int( "calories" );
}
for( std::string flag : jo.get_string_array( "flags" ) ) {
flags.emplace_back( flag );
}
Expand Down

0 comments on commit b5d7d84

Please sign in to comment.