mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
patterns: Update pattern language
This commit is contained in:
@@ -34,7 +34,7 @@ namespace hex::plugin::builtin {
|
||||
ContentRegistry::PatternLanguage::configureRuntime(runtime, &m_provider);
|
||||
|
||||
constexpr static auto DataDescriptionFunction = "get_data_description";
|
||||
if (runtime.executeFile(m_foundPatterns.front().patternFilePath)) {
|
||||
if (runtime.executeFile(m_foundPatterns.front().patternFilePath) == 0) {
|
||||
const auto &evaluator = runtime.getInternals().evaluator;
|
||||
const auto &functions = evaluator->getCustomFunctions();
|
||||
if (const auto function = functions.find(DataDescriptionFunction); function != functions.end()) {
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
ContentRegistry::PatternLanguage::configureRuntime(m_runtime, &m_provider);
|
||||
if (!m_runtime.executeString(this->m_sourceCode)) {
|
||||
if (m_runtime.executeString(this->m_sourceCode) != 0) {
|
||||
ui::ToastError::open("hex.builtin.view.fullscreen.save_editor.error.failed_execution"_lang);
|
||||
for (const auto &error : m_runtime.getCompileErrors()) {
|
||||
log::error("Save Editor Error: {}", error.format());
|
||||
|
||||
Reference in New Issue
Block a user