[3.x] Prevent writing incorrect shader hints
This commit is contained in:
parent
b8f87d3f86
commit
25e24f2d05
1 changed files with 1 additions and 0 deletions
|
@ -6006,6 +6006,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
_set_error("Expected valid type hint after ':'.");
|
_set_error("Expected valid type hint after ':'.");
|
||||||
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (uniform2.hint != ShaderNode::Uniform::HINT_RANGE && uniform2.hint != ShaderNode::Uniform::HINT_NONE && uniform2.hint != ShaderNode::Uniform::HINT_COLOR && type <= TYPE_MAT4) {
|
if (uniform2.hint != ShaderNode::Uniform::HINT_RANGE && uniform2.hint != ShaderNode::Uniform::HINT_NONE && uniform2.hint != ShaderNode::Uniform::HINT_COLOR && type <= TYPE_MAT4) {
|
||||||
|
|
Loading…
Reference in a new issue