mirror of https://github.com/WerWolv/ImHex.git
patterns: Fixed multi-variable decl crash
This commit is contained in:
parent
e3a6ac548b
commit
7eb4b40dc7
|
@ -715,8 +715,9 @@ namespace hex::pl {
|
|||
auto variableCleanup = SCOPE_GUARD { for (auto var : variables) delete var; };
|
||||
|
||||
do {
|
||||
variables.push_back(create(new ASTNodeVariableDecl(getValue<Token::Identifier>(-1).get(), type)));
|
||||
variables.push_back(create(new ASTNodeVariableDecl(getValue<Token::Identifier>(-1).get(), type->clone())));
|
||||
} while (MATCHES(sequence(SEPARATOR_COMMA, IDENTIFIER)));
|
||||
delete type;
|
||||
|
||||
variableCleanup.release();
|
||||
|
||||
|
|
Loading…
Reference in New Issue