From b7dd936dae3643d929202de3b207400b2f2866ac Mon Sep 17 00:00:00 2001 From: WerWolv Date: Tue, 16 Mar 2021 21:29:14 +0100 Subject: [PATCH] patterns: Fixed ternaries not being proper numeric expressions --- plugins/libimhex/source/lang/parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/libimhex/source/lang/parser.cpp b/plugins/libimhex/source/lang/parser.cpp index 7b4080a9f..002f8a57d 100644 --- a/plugins/libimhex/source/lang/parser.cpp +++ b/plugins/libimhex/source/lang/parser.cpp @@ -297,7 +297,7 @@ namespace hex::lang { throwParseError("expected ':' in ternary expression"); auto third = this->parseBooleanOr(); - node = new ASTNodeTernaryExpression(node, second, third, Token::Operator::TernaryConditional); + node = TO_NUMERIC_EXPRESSION(new ASTNodeTernaryExpression(node, second, third, Token::Operator::TernaryConditional)); } nodeCleanup.release();