diff options
author | Yuri Roubinsky <chaosus89@gmail.com> | 2020-03-20 17:45:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 17:45:48 +0300 |
commit | cce0a27ec7dd7c11fcb37eb724b0b7e97b3b1478 (patch) | |
tree | d987f96b6cf0a0821775b607baaf488a4cce5055 | |
parent | 2772840a602654e315ef221a84022525d159b33f (diff) | |
parent | 50729e4e35d5cd3e69045d612a6b61ad5280104d (diff) |
Merge pull request #37187 from Chaosus/shader_fix
Fix incorrect shader block parsing
-rw-r--r-- | servers/visual/shader_language.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 5739a35882..98786fad3b 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -5083,7 +5083,9 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui //a sub block, just because.. BlockNode *block = alloc_node<BlockNode>(); 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); } else if (tk.type == TK_CF_IF) { //if () {} |