From 9a1798dd2cbefc8529da4c6ded26a079633871c5 Mon Sep 17 00:00:00 2001 From: John Bytheway Date: Sun, 26 Jan 2020 14:46:44 -0500 Subject: [PATCH] Avoid uninitialized resistance values The resistances constructor for monsters left the DT_ELECTRIC value uninitialized. This led to inconsistent behaviour and CI test failures. Ensure it's initialized. --- src/damage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/damage.cpp b/src/damage.cpp index 36654241d0e0a..6ce887eb23d40 100644 --- a/src/damage.cpp +++ b/src/damage.cpp @@ -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 );