Fix considering string static value to not be true for visible expressions

This commit is contained in:
Jan committed 2023-09-24 14:18:15 +02:00
1 parent b8b4b7ce21
commit 5ee5056c5d
2 files changed
+11 -10

No files matched your search

@@ -502,7 +502,7 @@ namespace IW4
{
const auto* staticValue = dynamic_cast<const SimpleExpressionValue*>(expression);
isStatic = staticValue != nullptr;
isTruthy = isStatic && staticValue->IsTruthy();
isTruthy = isStatic && (staticValue->m_type == SimpleExpressionValue::Type::INT || staticValue->m_type == SimpleExpressionValue::Type::DOUBLE) && staticValue->IsTruthy();
}
else
{