diff --git a/plugins/devel/check-structures-sanity/check-structures-sanity.h b/plugins/devel/check-structures-sanity/check-structures-sanity.h index b173c45a0..7db57a6c6 100644 --- a/plugins/devel/check-structures-sanity/check-structures-sanity.h +++ b/plugins/devel/check-structures-sanity/check-structures-sanity.h @@ -80,6 +80,7 @@ public: bool unnamed; bool failfast; bool noprogress; + bool maybepointer; Checker(color_ostream & out); bool queue_item(const QueueItem & item, const CheckedStructure & cs); diff --git a/plugins/devel/check-structures-sanity/dispatch.cpp b/plugins/devel/check-structures-sanity/dispatch.cpp index bf06deb3c..77b16e39e 100644 --- a/plugins/devel/check-structures-sanity/dispatch.cpp +++ b/plugins/devel/check-structures-sanity/dispatch.cpp @@ -12,7 +12,8 @@ Checker::Checker(color_ostream & out) : sizes(false), unnamed(false), failfast(false), - noprogress(!out.is_console()) + noprogress(!out.is_console()), + maybepointer(false) { Core::getInstance().p->getMemRanges(mapped); } @@ -854,7 +855,7 @@ void Checker::check_stl_string(const QueueItem & item) } void Checker::check_possible_pointer(const QueueItem & item, const CheckedStructure & cs) { - if (sizes && uintptr_t(item.ptr) % sizeof(void *) == 0) + if (sizes && maybepointer && uintptr_t(item.ptr) % sizeof(void *) == 0) { auto ptr = validate_and_dereference(item, true); QueueItem ptr_item(item, "?maybe_pointer?", ptr); diff --git a/plugins/devel/check-structures-sanity/main.cpp b/plugins/devel/check-structures-sanity/main.cpp index f29e8f201..c503412f6 100644 --- a/plugins/devel/check-structures-sanity/main.cpp +++ b/plugins/devel/check-structures-sanity/main.cpp @@ -21,6 +21,7 @@ DFhackCExport command_result plugin_init(color_ostream &, std::vector & pa BOOL_PARAM(unnamed); BOOL_PARAM(failfast); BOOL_PARAM(noprogress); + BOOL_PARAM(maybepointer); #undef BOOL_PARAM if (parameters.size() > 1)