diff options
Diffstat (limited to 'test/src/thd.c')
-rw-r--r-- | test/src/thd.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/src/thd.c b/test/src/thd.c index 7e53625..c9d0065 100644 --- a/test/src/thd.c +++ b/test/src/thd.c @@ -14,8 +14,11 @@ void thd_join(thd_t thd, void **ret) { - if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret) - GetExitCodeThread(thd, (LPDWORD) ret); + if (WaitForSingleObject(thd, INFINITE) == WAIT_OBJECT_0 && ret) { + DWORD exit_code; + GetExitCodeThread(thd, (LPDWORD) &exit_code); + *ret = (void *)(uintptr_t)exit_code; + } } #else |