From 0e671b1569bb70237cb57b453fe00a8a8006ff14 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 12 Nov 2023 22:46:55 +0100 Subject: [PATCH] patterns: Updated pattern language Fixes #1196 --- lib/external/pattern_language | 2 +- plugins/builtin/source/ui/pattern_drawer.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/external/pattern_language b/lib/external/pattern_language index f192b6a22..a157dbcd9 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit f192b6a22c45f510a6ab22cb96861c79aa472137 +Subproject commit a157dbcd96e7a1b3714b5b0c49049c8ec653707c diff --git a/plugins/builtin/source/ui/pattern_drawer.cpp b/plugins/builtin/source/ui/pattern_drawer.cpp index e39f8567a..f31165b54 100644 --- a/plugins/builtin/source/ui/pattern_drawer.cpp +++ b/plugins/builtin/source/ui/pattern_drawer.cpp @@ -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()) {