mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 20:23:53 +00:00
Merge pull request #8095 from RandomShaper/fix-yield-crash
Fix random crashes when using yield()
This commit is contained in:
commit
33a2c5def0
@ -189,7 +189,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
|
||||
if (p_state) {
|
||||
//use existing (supplied) state (yielded)
|
||||
stack = (Variant *)p_state->stack.ptr();
|
||||
call_args = (Variant **)stack + sizeof(Variant) * p_state->stack_size;
|
||||
call_args = (Variant **)&p_state->stack.ptr()[sizeof(Variant) * p_state->stack_size]; //ptr() to avoid bounds check
|
||||
line = p_state->line;
|
||||
ip = p_state->ip;
|
||||
alloca_size = p_state->stack.size();
|
||||
|
Loading…
Reference in New Issue
Block a user