1
0
mirror of synced 2024-11-25 00:00:27 +01:00

patterns: Fixed string access

This commit is contained in:
WerWolv 2021-09-25 14:52:34 +02:00
parent 3850349eae
commit a8526585cb

View File

@ -1323,8 +1323,10 @@ namespace hex::pl {
[&, this](auto &&assignmentValue) { LogConsole::abortEvaluation(hex::format("cannot assign '{}' to string", pattern->getTypeName()), this); }
}, literal);
}
else
evaluator->getProvider()->read(pattern->getOffset(), value.data(), pattern->getSize());
else {
value.resize(pattern->getSize());
evaluator->getProvider()->read(pattern->getOffset(), value.data(), value.size());
}
literal = value;
} else if (auto bitfieldFieldPattern = dynamic_cast<PatternDataBitfieldField*>(pattern)) {