Skip to content

Commit

Permalink
Merge pull request CleverRaven#75630 from CleverRaven/fix-src-derefer…
Browse files Browse the repository at this point in the history
…ence-for-lto

Fix dereference into an empty container
  • Loading branch information
akrieger authored Aug 13, 2024
2 parents b74b10b + 8679ccb commit a3d543f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/battery_density_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static bool is_battery( const itype &type )
// ignore items from elsewhere, including the test mod.
if( type.has_flag( json_flag_DEBUG_ONLY ) ||
type.src.size() > 1 ||
type.src.back().second.str() != std::string( "dda" ) ) {
( type.src.size() == 1 && type.src.back().second.str() != std::string( "dda" ) ) ) {
return false;
}
if( !!type.magazine && type.magazine->type.count( ammo_battery ) > 0 ) {
Expand Down

0 comments on commit a3d543f

Please sign in to comment.