diff --git a/plugins/libimhex/include/hex/pattern_language/ast_node.hpp b/plugins/libimhex/include/hex/pattern_language/ast_node.hpp index 79fbe2796..3479c422d 100644 --- a/plugins/libimhex/include/hex/pattern_language/ast_node.hpp +++ b/plugins/libimhex/include/hex/pattern_language/ast_node.hpp @@ -1421,6 +1421,7 @@ namespace hex::pl { else { value.resize(pattern->getSize()); evaluator->getProvider()->read(pattern->getOffset(), value.data(), value.size()); + value.erase(std::find(value.begin(), value.end(), '\0'), value.end()); } }; @@ -1476,6 +1477,7 @@ namespace hex::pl { else { value.resize(pattern->getSize()); evaluator->getProvider()->read(pattern->getOffset(), value.data(), value.size()); + value.erase(std::find(value.begin(), value.end(), '\0'), value.end()); } literal = value;