From 22f78a80a2ea41033a113654c047f8e11a45b264 Mon Sep 17 00:00:00 2001 From: Tripp R <60992655+RealTrippR@users.noreply.github.com> Date: Sun, 24 Aug 2025 16:30:00 -0400 Subject: [PATCH] Fix cthreads_thread_detatch returning an incorrect error code Signed-off-by: Tripp R <60992655+RealTrippR@users.noreply.github.com> --- cthreads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cthreads.c b/cthreads.c index dea3270..821f642 100644 --- a/cthreads.c +++ b/cthreads.c @@ -70,7 +70,7 @@ int cthreads_thread_detach(struct cthreads_thread thread) { #endif #ifdef _WIN32 - return CloseHandle(thread.wThread); + return CloseHandle(thread.wThread)==0; #else return pthread_detach(thread.pThread); #endif