patterns: Updated pattern language

Fixes #1196
This commit is contained in:
WerWolv
2023-11-12 22:46:55 +01:00
parent 2c374e9761
commit 0e671b1569
2 changed files with 8 additions and 2 deletions

View File

@@ -279,7 +279,13 @@ namespace hex::plugin::builtin::ui {
}
void PatternDrawer::drawValueColumn(pl::ptrn::Pattern& pattern) {
const auto value = pattern.getFormattedValue();
std::string value;
try {
value = pattern.getFormattedValue();
} catch (const std::exception &e) {
value = e.what();
}
const auto width = ImGui::GetColumnWidth();
if (const auto &visualizeArgs = pattern.getAttributeArguments("hex::visualize"); !visualizeArgs.empty()) {