diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-06-17 19:17:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 19:17:44 +0200 |
commit | d341181f30b4f2e154748911f5d8a59b43aa6e62 (patch) | |
tree | 23c5f678829cb510f49307df2eb2a85a0bdd5fb9 | |
parent | 84e7552f83d8fb71a0fabb6bf6709f42401605d4 (diff) | |
parent | 9325671faa9d8407996effd4366f47733a1ec21b (diff) |
Merge pull request #38067 from ThakeeNathees/elif-error-line-fixed
GDScript debugger incorrect error line fixed
-rw-r--r-- | modules/gdscript/gdscript_compiler.cpp | 4 |
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; |