summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server
diff options
context:
space:
mode:
authorHaSa1002 <johawitt@outlook.de>2019-10-06 16:30:18 +0200
committerHaSa1002 <johawitt@outlook.de>2019-10-11 14:43:39 +0200
commitd9dfc4496c2814a53846f91e2dfc45bf3ab7c3c3 (patch)
tree41b52decc50085050b7b8f0fdd8174621514a3ef /modules/gdscript/language_server
parentf4afaecdd1220395acd5fe1e36368ba9bb146865 (diff)
fix #32588 crash in language server
Diffstat (limited to 'modules/gdscript/language_server')
-rw-r--r--modules/gdscript/language_server/gdscript_extend_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp
index 03d731a5f0..6b5c26ec81 100644
--- a/modules/gdscript/language_server/gdscript_extend_parser.cpp
+++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp
@@ -298,7 +298,7 @@ void ExtendGDScriptParser::parse_function_symbol(const GDScriptParser::FunctionN
const int line = LINE_NUMBER_TO_INDEX(p_func->line);
r_symbol.range.start.line = line;
r_symbol.range.start.character = p_func->column;
- r_symbol.range.end.line = MAX(p_func->body->end_line - 2, p_func->body->line);
+ r_symbol.range.end.line = MAX(p_func->body->end_line - 2, r_symbol.range.start.line);
r_symbol.range.end.character = lines[r_symbol.range.end.line].length();
r_symbol.selectionRange.start.line = r_symbol.range.start.line;
r_symbol.documentation = parse_documentation(line);