From 50729e4e35d5cd3e69045d612a6b61ad5280104d Mon Sep 17 00:00:00 2001 From: Yuri Roubinsky Date: Fri, 20 Mar 2020 17:24:00 +0300 Subject: [PATCH] Fix incorrect shader block parsing --- servers/visual/shader_language.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 5739a358828..98786fad3b0 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(); 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 () {}