From 91a1b9d766fda7309e877584c8b3323efbcdc9d8 Mon Sep 17 00:00:00 2001 From: xenocidewiki Date: Tue, 23 Mar 2021 23:39:06 +0000 Subject: [PATCH] Add check to not evaluate expressions that don't make sense --- src/dbg/expressionparser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/dbg/expressionparser.cpp b/src/dbg/expressionparser.cpp index d1c35fe4..7da3eb25 100644 --- a/src/dbg/expressionparser.cpp +++ b/src/dbg/expressionparser.cpp @@ -380,6 +380,7 @@ ExpressionParser::Token::Type ExpressionParser::resolveQuotedData() const { return b; }); + return allQuoted ? Token::Type::QuotedData : Token::Type::Data; } @@ -774,6 +775,8 @@ static bool evalOperation(ExpressionParser::Token::Type type, const ExpressionPa default: { duint op1v, op2v; + if(op1.isString || op2.isString) + return false; if(!op1.DoEvaluate(op1v, silent, baseonly) || !op2.DoEvaluate(op2v, silent, baseonly)) return false; T resultv;