diff --git a/plugins/yara_rules/source/content/yara_rule.cpp b/plugins/yara_rules/source/content/yara_rule.cpp index 0b5404310..cc08293d4 100644 --- a/plugins/yara_rules/source/content/yara_rule.cpp +++ b/plugins/yara_rules/source/content/yara_rule.cpp @@ -120,7 +120,7 @@ namespace hex::plugin::yara { &resultContext ); - if (yr_compiler_add_bytes(compiler, m_content.c_str(), m_content.size(), nullptr) != ERROR_SUCCESS) { + if (yr_compiler_add_string(compiler, m_content.c_str(), nullptr) != ERROR_SUCCESS) { std::string errorMessage(0xFFFF, '\x00'); yr_compiler_get_error_message(compiler, errorMessage.data(), errorMessage.size());