diff --git a/library/include/df/custom/knowledge_scholar_category_flag.methods.inc b/library/include/df/custom/knowledge_scholar_category_flag.methods.inc index c1fe1a564..031adbf4c 100644 --- a/library/include/df/custom/knowledge_scholar_category_flag.methods.inc +++ b/library/include/df/custom/knowledge_scholar_category_flag.methods.inc @@ -1,9 +1,9 @@ df::enums::dfhack_knowledge_scholar_flag::dfhack_knowledge_scholar_flag value() const { - int32_t value = category * 32; + int32_t value = int32_t(flag_type) * 32; for (int32_t i = 0; i < 32; i++) { - if (flags.whole & (1 << i)) + if (flag_data.whole & (1 << i)) { value += i; break; diff --git a/library/xml b/library/xml index 17b1c45ff..caf5b7dfd 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit 17b1c45fff78d0c49aa8b4dc4824dc36ae7eae08 +Subproject commit caf5b7dfd090c73a0cb08b5507b588ea8f12bab9 diff --git a/plugins/devel/check-structures-sanity.cpp b/plugins/devel/check-structures-sanity.cpp index c0278afba..fc74253c9 100644 --- a/plugins/devel/check-structures-sanity.cpp +++ b/plugins/devel/check-structures-sanity.cpp @@ -6,6 +6,8 @@ #include "LuaTools.h" #include "LuaWrapper.h" +#include "df/large_integer.h" + #if defined(WIN32) && defined(DFHACK64) #define _WIN32_WINNT 0x0501 #define WINVER 0x0501 @@ -92,7 +94,7 @@ static const struct_field_info *find_union_tag(const struct_field_info *fields, name.erase(name.length() - 4, 4); name += "type"; - if (tag_field->name == name) + if (tag_field->mode != struct_field_info::END && tag_field->name == name) { // fast path; we already have the correct field } @@ -700,6 +702,13 @@ void Checker::check_dispatch(ToCheck & item) return; } + // special case for large_integer weirdness + if (item.identity == df::identity_traits::get()) + { + item.identity = df::identity_traits::get(); + } + + switch (item.identity->type()) { case IDTYPE_GLOBAL: