Skip to content

Commit 66904f8

Browse files
authored
Ensure that a premature call will not overwrite unrelated memory
1 parent 9e81a3a commit 66904f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver/others/blas_server_win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ void goto_set_num_threads(int num_threads)
568568
blas_server_avail = 1;
569569
}
570570

571-
for(i = blas_num_threads - 1; i < num_threads - 1; i++){
571+
for(i = (blas_num_threads > 0) ? blas_num_threads - 1 : 0; i < num_threads - 1; i++){
572572

573573
blas_threads[i] = CreateThread(NULL, 0,
574574
blas_thread_server, (void *)i,

0 commit comments

Comments
 (0)