From a25a2c1fff7cf2c977a39d9fbbfd88848caeab32 Mon Sep 17 00:00:00 2001 From: hexagonrecursion <52621858+hexagonrecursion@users.noreply.github.com> Date: Wed, 25 Dec 2019 13:51:00 +0000 Subject: [PATCH] Add missing was_loaded initialization src/item_category.cpp:30:20: runtime error: load of value 192, which is not a valid value for type 'bool' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/item_category.cpp:30:20 in src/item_category.cpp:31:19: runtime error: load of value 192, which is not a valid value for type 'bool' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/item_category.cpp:31:19 in src/item_category.cpp:32:19: runtime error: load of value 192, which is not a valid value for type 'bool' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/item_category.cpp:32:19 in --- src/item_category.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item_category.h b/src/item_category.h index 11f0c339f6ebd..c318af6fc56dc 100644 --- a/src/item_category.h +++ b/src/item_category.h @@ -14,7 +14,7 @@ class JsonObject; // this is a helper struct with rules for picking a zone struct zone_priority_data { - bool was_loaded; + bool was_loaded = false; zone_type_id id; bool filthy = false; cata::flat_set flags;