Skip to content

Commit

Permalink
runtime: fix arguments getting corrupted when launching a method on a…
Browse files Browse the repository at this point in the history
… new thread
  • Loading branch information
Wertzui123 committed Sep 14, 2024
1 parent 05cceb0 commit 0f04b1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stdlib/aspl/compiler/backend/stringcode/c/template.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ void ASPL_LAUNCH_THREAD_METHOD(ASPL_OBJECT_TYPE (*callback)(ASPL_OBJECT_TYPE*, A
ASPL_ThreadMethodWrapperData* args = ASPL_MALLOC(sizeof(ASPL_ThreadMethodWrapperData));
args->callback = callback;
args->this = this;
args->args = arguments;
args->args = ASPL_MALLOC(arg_size);
memcpy(args->args, arguments, arg_size);
thread_create(aspl_method_thread_wrapper, args, THREAD_STACK_SIZE_DEFAULT);
}
#endif
Expand Down

0 comments on commit 0f04b1b

Please sign in to comment.