Package: cataclysm-dda / 0.C+git20190228.faafa3a-2

uninitialized-value.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
From: Kevin Granade <kevin.granade@gmail.com>
Subject: [PATCH] Initialize reach_attacking member. (#28430)

Avoids undefined behaviour, which was appearing as sporadic unit test failures.

Bug: https://github.com/CleverRaven/Cataclysm-DDA/pull/28430
Origin: upstream, https://github.com/CleverRaven/Cataclysm-DDA/commit/72e753a

--- a/src/player.h
+++ b/src/player.h
@@ -1521,7 +1521,7 @@
         std::vector<matype_id> ma_styles;
         matype_id style_selected;
         bool keep_hands_free;
-        bool reach_attacking;
+        bool reach_attacking = false;
 
         std::vector <addiction> addictions;