From 740e77f47ff0cae4255cbc1c2f541510d6d286dc Mon Sep 17 00:00:00 2001 From: RedMser Date: Thu, 17 Jan 2019 19:25:08 +0100 Subject: [PATCH] Fix shader compile error line numbers starting at 0. (cherry picked from commit a285a1cfdfd85d2be27c6d6a7895298f906865c2) --- drivers/gles3/shader_compiler_gles3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gles3/shader_compiler_gles3.cpp b/drivers/gles3/shader_compiler_gles3.cpp index 7e7892133d4..1c742e0ac9f 100644 --- a/drivers/gles3/shader_compiler_gles3.cpp +++ b/drivers/gles3/shader_compiler_gles3.cpp @@ -729,7 +729,7 @@ Error ShaderCompilerGLES3::compile(VS::ShaderMode p_mode, const String &p_code, Vector shader = p_code.split("\n"); for (int i = 0; i < shader.size(); i++) { - print_line(itos(i) + " " + shader[i]); + print_line(itos(i + 1) + " " + shader[i]); } _err_print_error(NULL, p_path.utf8().get_data(), parser.get_error_line(), parser.get_error_text().utf8().get_data(), ERR_HANDLER_SHADER);