1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

GDScript: Fix crash caused by uninitialized temp stack slots

This adds initialization to every typed temporary stack slot at the
beginning of the function call instead of emitting instructions, since
those might be in a conditional branch and not be called.
This commit is contained in:
George Marques
2021-05-17 10:59:43 -03:00
parent c3002c0955
commit 10a1f64968
3 changed files with 49 additions and 7 deletions

View File

@@ -496,6 +496,8 @@ private:
Vector<GDScriptDataType> argument_types;
GDScriptDataType return_type;
Map<int, Variant::Type> temporary_slots;
#ifdef TOOLS_ENABLED
Vector<StringName> arg_names;
Vector<Variant> default_arg_values;