summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gd_function.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-02-14 07:46:45 +0100
committerGitHub <noreply@github.com>2017-02-14 07:46:45 +0100
commitfdbe1c3c61b013ea57ff6fabec26054c92473d0f (patch)
tree04b796a64cd3fbeca6ccb3bf2a501f0a79b3545b /modules/gdscript/gd_function.cpp
parentfb4b4a30e759f16707003e943d584bbce7964843 (diff)
parente8611966de4dfc9c28a7a4de1798f3f10ff87f80 (diff)
downloadredot-engine-fdbe1c3c61b013ea57ff6fabec26054c92473d0f.tar.gz
Merge pull request #7801 from hpvb/fix-7796
Remove bounds check when resuming from yield. (fixes #7796)
Diffstat (limited to 'modules/gdscript/gd_function.cpp')
-rw-r--r--modules/gdscript/gd_function.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp
index d7274b5b8e..31bac2748a 100644
--- a/modules/gdscript/gd_function.cpp
+++ b/modules/gdscript/gd_function.cpp
@@ -171,7 +171,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**)&p_state->stack[sizeof(Variant)*p_state->stack_size];
+ call_args=(Variant**)stack + sizeof(Variant)*p_state->stack_size;
line=p_state->line;
ip=p_state->ip;
alloca_size=p_state->stack.size();