Skip to content

Commit

Permalink
Avoid uninitialized resistance values
Browse files Browse the repository at this point in the history
The resistances constructor for monsters left the DT_ELECTRIC value
uninitialized.  This led to inconsistent behaviour and CI test failures.

Ensure it's initialized.
  • Loading branch information
jbytheway committed Jan 26, 2020
1 parent 63458a7 commit 9a1798d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/damage.cpp
Expand Up @@ -194,7 +194,7 @@ resistances::resistances( const item &armor, bool to_self )
}
}
}
resistances::resistances( monster &monster )
resistances::resistances( monster &monster ) : resistances()
{
set_resist( DT_BASH, monster.type->armor_bash );
set_resist( DT_CUT, monster.type->armor_cut );
Expand Down

0 comments on commit 9a1798d

Please sign in to comment.