diff --git a/lib/external/pattern_language b/lib/external/pattern_language index 9f6f7fbb8..b4e973c31 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit 9f6f7fbb8d63fed1941196d43bc9e8d705234203 +Subproject commit b4e973c3103a9244f2f304d55a7720a956a67f4e diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index f965b6f17..a8b33f22e 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -812,9 +812,13 @@ namespace hex::plugin::builtin { this->m_textEditor.SetErrorMarkers({}); this->m_console.clear(); - auto &runtime = ProviderExtraData::getCurrent().patternLanguage.runtime; + auto provider = ImHexApi::Provider::get(); + auto &runtime = ProviderExtraData::get(provider).patternLanguage.runtime; + runtime->reset(); runtime->setIncludePaths(fs::getDefaultPaths(fs::ImHexPath::PatternsInclude) | fs::getDefaultPaths(fs::ImHexPath::Patterns)); + runtime->setDataBaseAddress(provider->getBaseAddress()); + runtime->setDataSize(provider->getActualSize()); EventManager::post();