summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-06-17 19:17:44 +0200
committerGitHub <noreply@github.com>2020-06-17 19:17:44 +0200
commitd341181f30b4f2e154748911f5d8a59b43aa6e62 (patch)
tree23c5f678829cb510f49307df2eb2a85a0bdd5fb9 /modules
parent84e7552f83d8fb71a0fabb6bf6709f42401605d4 (diff)
parent9325671faa9d8407996effd4366f47733a1ec21b (diff)
Merge pull request #38067 from ThakeeNathees/elif-error-line-fixed
GDScript debugger incorrect error line fixed
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gdscript_compiler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp
index bc095ae1f9..5bc9003c29 100644
--- a/modules/gdscript/gdscript_compiler.cpp
+++ b/modules/gdscript/gdscript_compiler.cpp
@@ -1422,6 +1422,10 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
codegen.opcodes.push_back(0);
codegen.opcodes.write[else_addr] = codegen.opcodes.size();
+ codegen.opcodes.push_back(GDScriptFunction::OPCODE_LINE);
+ codegen.opcodes.push_back(cf->body_else->line);
+ codegen.current_line = cf->body_else->line;
+
Error err2 = _parse_block(codegen, cf->body_else, p_stack_level, p_break_addr, p_continue_addr);
if (err2) {
return err2;