mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #12160 from RandomShaper/fix-shader-parse
Fix crash in shader parsing
This commit is contained in:
commit
bc659323b7
@ -2586,6 +2586,8 @@ ShaderLanguage::Node *ShaderLanguage::_parse_expression(BlockNode *p_block, cons
|
||||
} else if (tk.type == TK_BRACKET_OPEN) {
|
||||
|
||||
Node *index = _parse_and_reduce_expression(p_block, p_builtin_types);
|
||||
if (!index)
|
||||
return NULL;
|
||||
|
||||
if (index->get_datatype() != TYPE_INT && index->get_datatype() != TYPE_UINT) {
|
||||
_set_error("Only integer datatypes are allowed for indexing");
|
||||
|
Loading…
Reference in New Issue
Block a user