summaryrefslogtreecommitdiffhomepage
path: root/src/thread/ntapi_tt_create_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/ntapi_tt_create_thread.c')
-rw-r--r--src/thread/ntapi_tt_create_thread.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/thread/ntapi_tt_create_thread.c b/src/thread/ntapi_tt_create_thread.c
index 5ee1db0..ad69905 100644
--- a/src/thread/ntapi_tt_create_thread.c
+++ b/src/thread/ntapi_tt_create_thread.c
@@ -1,6 +1,6 @@
/********************************************************/
/* ntapi: Native API core library */
-/* Copyright (C) 2013--2017 Z. Gilboa */
+/* Copyright (C) 2013--2019 Z. Gilboa */
/* Released under GPLv2 and GPLv3; see COPYING.NTAPI. */
/********************************************************/
@@ -217,7 +217,7 @@ int32_t __stdcall __ntapi_tt_create_thread(nt_thread_params * params)
/* */
/* A "RAPUNZEL" TOP-OF-STACK, VARIABLE-SIZE ENTRY-ROUTINE CONTEXT */
/* */
-/* COPYRIGHT (C) 2013--2018 ZVI GILBOA */
+/* COPYRIGHT (C) 2013--2019 ZVI GILBOA */
/* */
/* */
/* */
@@ -264,11 +264,17 @@ int32_t __stdcall __ntapi_tt_create_thread(nt_thread_params * params)
/**/ /**/
/**/ /**/
/* write entry-routine argument */
-/**/ if (params->creation_flags & NT_CREATE_LOCAL_THREAD) /**/
+/**/ if (sizeof(intptr_t) == 8) { /**/
/**/ at_store( /**/
/**/ (intptr_t *)parg, /**/
/**/ (intptr_t)params->arg); /**/
-/**/ else { /**/
+/**/ /**/
+/**/ } else if (params->creation_flags & NT_CREATE_LOCAL_THREAD) { /**/
+/**/ at_store( /**/
+/**/ (intptr_t *)parg, /**/
+/**/ (intptr_t)params->arg); /**/
+/**/ /**/
+/**/ } else { /**/
/**/ status = __ntapi->zw_write_virtual_memory( /**/
/**/ params->hprocess, /**/
/**/ parg, /**/