mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 18:41:29 +00:00
GDScript: Fix autocomplete crash when searching default values
Fix #21700
This commit is contained in:
parent
b530031442
commit
6c70c4c358
1 changed files with 1 additions and 1 deletions
|
|
@ -1221,7 +1221,7 @@ static bool _guess_identifier_type(const GDScriptCompletionContext &p_context, c
|
|||
|
||||
int def_from = p_context.function->arguments.size() - p_context.function->default_values.size();
|
||||
if (i >= def_from) {
|
||||
int def_idx = def_from - i;
|
||||
int def_idx = i - def_from;
|
||||
if (p_context.function->default_values[def_idx]->type == GDScriptParser::Node::TYPE_OPERATOR) {
|
||||
const GDScriptParser::OperatorNode *op = static_cast<const GDScriptParser::OperatorNode *>(p_context.function->default_values[def_idx]);
|
||||
if (op->arguments.size() < 2) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue