Fix static functions loop using class' functions

Besides being incorrect, it also caused a hard editor crash for purely
static classes or classes with more static functions than methods.
This commit is contained in:
Francois Belair 2020-01-28 14:19:09 -05:00
parent 1c3aff42de
commit f6968d5f17

View file

@ -757,7 +757,7 @@ Dictionary ExtendGDScriptParser::dump_class_api(const GDScriptParser::ClassNode
Array static_functions;
for (int i = 0; i < p_class->static_functions.size(); ++i) {
static_functions.append(dump_function_api(p_class->functions[i]));
static_functions.append(dump_function_api(p_class->static_functions[i]));
}
class_api["static_functions"] = static_functions;