mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-03 05:57:40 -05:00
fix: Errors causing #pragma magic to not work as expected
This commit is contained in:
@@ -1373,7 +1373,7 @@ namespace hex::plugin::builtin {
|
||||
if (end == std::string::npos)
|
||||
return std::nullopt;
|
||||
|
||||
value = value.substr(0, end - 1);
|
||||
value = value.substr(0, end);
|
||||
value = wolv::util::trim(value);
|
||||
|
||||
return BinaryPattern(value);
|
||||
@@ -1406,6 +1406,9 @@ namespace hex::plugin::builtin {
|
||||
return false;
|
||||
|
||||
std::vector<u8> bytes(pattern->getSize());
|
||||
if (bytes.empty())
|
||||
return false;
|
||||
|
||||
provider->read(*address, bytes.data(), bytes.size());
|
||||
|
||||
if (pattern->matches(bytes))
|
||||
|
||||
Reference in New Issue
Block a user