mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Merge pull request #37187 from Chaosus/shader_fix
Fix incorrect shader block parsing
This commit is contained in:
commit
cce0a27ec7
@ -5083,7 +5083,9 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui
|
|||||||
//a sub block, just because..
|
//a sub block, just because..
|
||||||
BlockNode *block = alloc_node<BlockNode>();
|
BlockNode *block = alloc_node<BlockNode>();
|
||||||
block->parent_block = p_block;
|
block->parent_block = p_block;
|
||||||
_parse_block(block, p_builtin_types, false, p_can_break, p_can_continue);
|
if (_parse_block(block, p_builtin_types, false, p_can_break, p_can_continue) != OK) {
|
||||||
|
return ERR_PARSE_ERROR;
|
||||||
|
}
|
||||||
p_block->statements.push_back(block);
|
p_block->statements.push_back(block);
|
||||||
} else if (tk.type == TK_CF_IF) {
|
} else if (tk.type == TK_CF_IF) {
|
||||||
//if () {}
|
//if () {}
|
||||||
|
Loading…
Reference in New Issue
Block a user