diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-01-06 00:39:35 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-01-06 00:39:35 -0300 |
commit | bd0356207631602f35e2111bc73bca2bd53e91a1 (patch) | |
tree | 6d8fd9e373913496281aed33016d0b4f6aa7a8dc /modules/gdscript | |
parent | f75ae815d51571287892d77414d45e15bfdb849b (diff) |
-Resolved bug that made yield() not work in some situations, fixes #884
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gd_compiler.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/gd_script.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp index 6289e6961c..278651d642 100644 --- a/modules/gdscript/gd_compiler.cpp +++ b/modules/gdscript/gd_compiler.cpp @@ -528,7 +528,7 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre int ret = _parse_expression(codegen,on->arguments[i],slevel); if (ret<0) return ret; - if (ret&GDFunction::ADDR_TYPE_STACK<<GDFunction::ADDR_BITS) { + if (ret&(GDFunction::ADDR_TYPE_STACK<<GDFunction::ADDR_BITS)) { slevel++; codegen.alloc_stack(slevel); } diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 3f7a6b000f..0aa115ffbc 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -820,7 +820,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a gdfs->state.stack.resize(alloca_size); //copy variant stack for(int i=0;i<_stack_size;i++) { - memnew_placement(&stack[sizeof(Variant)*i],Variant(stack[i])); + memnew_placement(&gdfs->state.stack[sizeof(Variant)*i],Variant(stack[i])); } gdfs->state.stack_size=_stack_size; gdfs->state.self=self; |