From c6399519c83e3832c62f9a150ae83fedb5e5aca8 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 23 Jun 2022 12:06:15 -0700 Subject: [PATCH] Typed primitive subtraction result fix --- IDEHelper/Compiler/BfExprEvaluator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IDEHelper/Compiler/BfExprEvaluator.cpp b/IDEHelper/Compiler/BfExprEvaluator.cpp index cd2de450..b1f2093b 100644 --- a/IDEHelper/Compiler/BfExprEvaluator.cpp +++ b/IDEHelper/Compiler/BfExprEvaluator.cpp @@ -23712,7 +23712,7 @@ void BfExprEvaluator::PerformBinaryOperation(BfAstNode* leftExpression, BfAstNod auto underlyingType = resultType->GetUnderlyingType(); - if (binaryOp == BfBinaryOp_Subtract) + if ((binaryOp == BfBinaryOp_Subtract) && (otherTypedValue->mType == resultType)) { intptr maxDist = 0; auto resultTypeInstance = resultType->ToTypeInstance();