From 5e0e399209c58d478d0124c9cc8fd60bbdb55121 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 14 Mar 2023 14:23:45 -0700 Subject: [PATCH] Fixed EmitNumericCast immediate issue --- IDEHelper/Compiler/CeMachine.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/IDEHelper/Compiler/CeMachine.cpp b/IDEHelper/Compiler/CeMachine.cpp index 65c7ca2f..cc56e56c 100644 --- a/IDEHelper/Compiler/CeMachine.cpp +++ b/IDEHelper/Compiler/CeMachine.cpp @@ -1007,6 +1007,13 @@ void CeBuilder::EmitBinaryOp(CeOp iOp, CeOp fOp, const CeOperand& lhs, const CeO CeOperand CeBuilder::EmitNumericCast(const CeOperand& ceValue, BeType* toType, bool valSigned, bool toSigned) { + if (ceValue.mKind == CeOperandKind_Immediate) + { + CeOperand newVal = ceValue; + newVal.mType = toType; + return newVal; + } + CeOperand result; auto fromType = ceValue.mType;