From 6414fd301b729b1ce1d418129ff41f48b6313bab Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 6 Nov 2016 13:21:47 +0100 Subject: [PATCH] - let's add a 'float' cast, too, just in case. It still will cast to double, because single precision floats only can exist as memory values. --- src/scripting/codegeneration/codegen.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index b2d0b2f0a..58f73a891 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -6086,6 +6086,7 @@ FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx) case NAME_Bool: case NAME_Int: case NAME_uInt: + case NAME_Float: case NAME_Double: case NAME_Name: case NAME_Color: @@ -6097,6 +6098,7 @@ FxExpression *FxFunctionCall::Resolve(FCompileContext& ctx) MethodName == NAME_Bool ? TypeBool : MethodName == NAME_Int ? TypeSInt32 : MethodName == NAME_uInt ? TypeUInt32 : + MethodName == NAME_Float ? TypeFloat64 : MethodName == NAME_Double ? TypeFloat64 : MethodName == NAME_Name ? TypeName : MethodName == NAME_Color ? TypeColor :