Fix LSP crash when parsing signal symbols.

If the number of parameters was less than the number of class members, the LSP would cause godot to crash because it was using the index for class members instead of the index for signal parameters.

Fixes #54720 .
This commit is contained in:
Francois Belair 2021-11-07 12:20:25 -05:00
parent 9f46ce8652
commit 4995a477ff

View file

@ -269,7 +269,7 @@ void ExtendGDScriptParser::parse_class_symbol(const GDScriptParser::ClassNode *p
if (j > 0) {
symbol.detail += ", ";
}
symbol.detail += m.signal->parameters[i]->identifier->name;
symbol.detail += m.signal->parameters[j]->identifier->name;
}
symbol.detail += ")";