mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	GDScript debugger incorrect error line fixed
if the first line of an else or an elif throws a runtime error the debugger shows incorrect line number.
This commit is contained in:
		
							parent
							
								
									495b28765d
								
							
						
					
					
						commit
						9325671faa
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -1381,6 +1381,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; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Thakee Nathees
						Thakee Nathees