From 212c6306a8c1e1306a6966ec7959916849f8a283 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Mon, 1 May 2017 23:36:24 -0700 Subject: Fix get_shader_type index upper bound --- servers/visual/shader_language.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers') diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index dd653ea891..9fe92f0fec 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; -- cgit v1.2.3