From 0919ed58dbc419107f93491ccce03fbf3f7dff3b Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 27 Jun 2023 10:12:53 +0200 Subject: [PATCH] restore old thread adding behavior while avoiding bounds issues --- driver/others/blas_server_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/others/blas_server_win32.c b/driver/others/blas_server_win32.c index 0b213bf2c..62fac92af 100644 --- a/driver/others/blas_server_win32.c +++ b/driver/others/blas_server_win32.c @@ -556,7 +556,7 @@ void goto_set_num_threads(int num_threads) blas_server_avail = 1; } - for(i = blas_num_threads; i < num_threads - 1; i++){ + for(i = (blas_num_threads > 0 ? blas_num_threads-1 : 0; i < num_threads - 1; i++){ blas_threads[i] = CreateThread(NULL, 0, blas_thread_server, (void *)i,