From ee6b281ae3a51fe7d728225f3006b665976b6792 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Wed, 19 Feb 2020 11:40:31 -0600 Subject: [PATCH] allow check-structures-sanity to check the size of the value explicitly specified in a lua expression rather than just its descendants. print an error if getting the type identity fails. --- plugins/devel/check-structures-sanity.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/devel/check-structures-sanity.cpp b/plugins/devel/check-structures-sanity.cpp index f21fed278..7af18c7a0 100644 --- a/plugins/devel/check-structures-sanity.cpp +++ b/plugins/devel/check-structures-sanity.cpp @@ -165,12 +165,14 @@ static command_result command(color_ostream & out, std::vector & pa ToCheck ref; ref.path.push_back(parameters.at(0)); + ref.path.push_back(""); // tell check_struct that it is a pointer ref.ptr = get_object_ref(State, -1); lua_getfield(State, -1, "_type"); lua_getfield(State, -1, "_identity"); ref.identity = reinterpret_cast(lua_touserdata(State, -1)); if (!ref.identity) { + out.printerr("could not determine type identity\n"); return CR_FAILURE; }