mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
patterns: Restore data offset for local variables / added array, nested structs and functions tests (#475)
* fix(eval): restore data offset for local variables * test(pattern_lang): add tests for arrays, nested structs and functions Co-authored-by: Dmitry Polshakov <dmitry.polshakov@dsr-corporation.com>
This commit is contained in:
@@ -37,12 +37,13 @@ namespace hex::pl {
|
||||
auto startOffset = this->dataOffset();
|
||||
|
||||
std::unique_ptr<Pattern> pattern;
|
||||
this->dataOffset() = startOffset;
|
||||
|
||||
bool referenceType = false;
|
||||
|
||||
auto typePattern = type->createPatterns(this);
|
||||
|
||||
this->dataOffset() = startOffset;
|
||||
|
||||
if (typePattern.empty()) {
|
||||
// Handle auto variables
|
||||
if (!value.has_value())
|
||||
|
||||
Reference in New Issue
Block a user