Fix shader compile error line numbers starting at 0.

This commit is contained in:
RedMser 2019-01-17 19:25:08 +01:00
parent f958ba5abc
commit a285a1cfdf
2 changed files with 2 additions and 2 deletions

View File

@ -737,7 +737,7 @@ Error ShaderCompilerGLES2::compile(VS::ShaderMode p_mode, const String &p_code,
Vector<String> shader = p_code.split("\n"); Vector<String> shader = p_code.split("\n");
for (int i = 0; i < shader.size(); i++) { 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); _err_print_error(NULL, p_path.utf8().get_data(), parser.get_error_line(), parser.get_error_text().utf8().get_data(), ERR_HANDLER_SHADER);

View File

@ -748,7 +748,7 @@ Error ShaderCompilerGLES3::compile(VS::ShaderMode p_mode, const String &p_code,
Vector<String> shader = p_code.split("\n"); Vector<String> shader = p_code.split("\n");
for (int i = 0; i < shader.size(); i++) { 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); _err_print_error(NULL, p_path.utf8().get_data(), parser.get_error_line(), parser.get_error_text().utf8().get_data(), ERR_HANDLER_SHADER);