diff --git a/lib/libimhex/include/hex/pattern_language/patterns/pattern.hpp b/lib/libimhex/include/hex/pattern_language/patterns/pattern.hpp index 5cb6f83a8..5f28792a8 100644 --- a/lib/libimhex/include/hex/pattern_language/patterns/pattern.hpp +++ b/lib/libimhex/include/hex/pattern_language/patterns/pattern.hpp @@ -256,7 +256,7 @@ namespace hex::pl { ImGui::TableNextColumn(); ImGui::TextFormatted("0x{0:04X}", this->getSize()); ImGui::TableNextColumn(); - ImGui::TextFormattedColored(ImColor(0xFF9BC64D), "{}", this->getFormattedName()); + ImGui::TextFormattedColored(ImColor(0xFF9BC64D), "{}", this->getTypeName().empty() ? this->getFormattedName() : this->getTypeName()); ImGui::TableNextColumn(); ImGui::TextFormatted("{}", formatDisplayValue(value, std::move(literal))); } diff --git a/lib/libimhex/include/hex/pattern_language/patterns/pattern_pointer.hpp b/lib/libimhex/include/hex/pattern_language/patterns/pattern_pointer.hpp index 8bd25c9b8..28a4698e5 100644 --- a/lib/libimhex/include/hex/pattern_language/patterns/pattern_pointer.hpp +++ b/lib/libimhex/include/hex/pattern_language/patterns/pattern_pointer.hpp @@ -61,7 +61,7 @@ namespace hex::pl { } [[nodiscard]] std::string getFormattedName() const override { - std::string result = this->m_pointedAt->getFormattedName() + "* : "; + std::string result = this->getTypeName().empty() ? this->getFormattedName() : this->getTypeName() + "* : "; switch (this->getSize()) { case 1: result += "u8";