diff --git a/src/scripting/backend/codegen.cpp b/src/scripting/backend/codegen.cpp index 72de1b6b3..02aadc01f 100644 --- a/src/scripting/backend/codegen.cpp +++ b/src/scripting/backend/codegen.cpp @@ -1881,6 +1881,12 @@ FxExpression *FxMinusSign::Resolve(FCompileContext& ctx) delete this; return e; } + else if (Operand->ValueType == TypeBool) + { + Operand = new FxIntCast(Operand, true); + Operand = Operand->Resolve(ctx); + assert(Operand != nullptr); + } ValueType = Operand->ValueType; return this; }