Skip to content

Commit

Permalink
Fix FVector to Vector comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRaveYard authored and coelckers committed Jun 24, 2022
1 parent 59458cf commit 9a083d2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/common/scripting/backend/codegen.cpp
Expand Up @@ -3522,7 +3522,8 @@ FxExpression *FxCompareEq::Resolve(FCompileContext& ctx)
return nullptr;
}

if (left->ValueType != right->ValueType) // identical types are always comparable, if they can be placed in a register, so we can save most checks if this is the case.
// identical types are always comparable, if they can be placed in a register, so we can save most checks if this is the case.
if (left->ValueType != right->ValueType && !(left->IsVector2() && right->IsVector2()) && !(left->IsVector3() && right->IsVector3()))
{
FxExpression *x;
if (left->IsNumeric() && right->ValueType == TypeString && (x = StringConstToChar(right)))
Expand Down

0 comments on commit 9a083d2

Please sign in to comment.