From 40592a93ac2b2e3ba653b20e0084080bede1808c Mon Sep 17 00:00:00 2001 From: WerWolv Date: Wed, 28 Feb 2024 20:54:51 +0100 Subject: [PATCH] fix: MIME-based pattern loading not working correctly Fixes #1574 --- plugins/builtin/source/content/views/view_pattern_editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/views/view_pattern_editor.cpp b/plugins/builtin/source/content/views/view_pattern_editor.cpp index c9cf0cdf3..362a58221 100644 --- a/plugins/builtin/source/content/views/view_pattern_editor.cpp +++ b/plugins/builtin/source/content/views/view_pattern_editor.cpp @@ -1305,7 +1305,7 @@ namespace hex::plugin::builtin { pl::PatternLanguage runtime; ContentRegistry::PatternLanguage::configureRuntime(runtime, provider); - auto mimeType = magic::getMIMEType(provider, true); + auto mimeType = magic::getMIMEType(provider, 0, 100_KiB, true); bool foundCorrectType = false; runtime.addPragma("MIME", [&mimeType, &foundCorrectType](const pl::PatternLanguage &runtime, const std::string &value) {