From 7d515e72c2f8e63a6310eec7fbf7611874e7ebcb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 2 Jun 2018 07:50:23 +0200 Subject: [PATCH] - fixed: FxFloatCast must transfer the outer expression's value type to the inner expression if it performs a float->float cast. This violated an important rule that a cast may not alter the expression's type and led to failed asserts elsewhere. --- src/scripting/backend/codegen.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scripting/backend/codegen.cpp b/src/scripting/backend/codegen.cpp index e7180afd16..8dfe5d8f8e 100644 --- a/src/scripting/backend/codegen.cpp +++ b/src/scripting/backend/codegen.cpp @@ -1060,6 +1060,7 @@ FxExpression *FxFloatCast::Resolve(FCompileContext &ctx) if (basex->IsFloat()) { FxExpression *x = basex; + x->ValueType = ValueType; basex = nullptr; delete this; return x;