mirror of
https://github.com/godotengine/godot.git
synced 2025-01-24 21:01:50 +08:00
Merge pull request #52931 from Chaosus/fix_shader_comparison_crash
This commit is contained in:
commit
f25aaa98d6
@ -5252,7 +5252,9 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG_ENABLED
|
#if DEBUG_ENABLED
|
||||||
if (check_warnings && HAS_WARNING(ShaderWarning::FLOAT_COMPARISON_FLAG) && (op == OP_EQUAL || op == OP_NOT_EQUAL) && expression[i - 1].node->get_datatype() == TYPE_FLOAT && expression[i + 1].node->get_datatype() == TYPE_FLOAT) {
|
if (check_warnings && HAS_WARNING(ShaderWarning::FLOAT_COMPARISON_FLAG) && (op == OP_EQUAL || op == OP_NOT_EQUAL) &&
|
||||||
|
(!expression[i - 1].is_op && !expression[i + 1].is_op) &&
|
||||||
|
(expression[i - 1].node->get_datatype() == TYPE_FLOAT && expression[i + 1].node->get_datatype() == TYPE_FLOAT)) {
|
||||||
_add_line_warning(ShaderWarning::FLOAT_COMPARISON);
|
_add_line_warning(ShaderWarning::FLOAT_COMPARISON);
|
||||||
}
|
}
|
||||||
#endif // DEBUG_ENABLED
|
#endif // DEBUG_ENABLED
|
||||||
|
Loading…
Reference in New Issue
Block a user