diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index dd653ea891f..9fe92f0fec8 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -3751,7 +3751,7 @@ String ShaderLanguage::get_shader_type(const String &p_code) { String cur_identifier; - for (int i = 0; i < p_code.length() + 1; i++) { + for (int i = 0; i < p_code.length(); i++) { if (p_code[i] == ';') { break;