fix #4101, bounds issue in goto_set_num_threads on Windows

This commit is contained in:
Mark Seminatore 2023-06-23 16:35:32 -07:00
parent 641454804f
commit e147dbbc7d
2 changed files with 5 additions and 1 deletions

View File

@ -216,3 +216,7 @@ In chronological order:
* Pablo Romero <https://github.com/pablorcum>
* [2022-08] Fix building from sources for QNX
* Mark Seminatore <https://github.com/mseminatore>
* [2023] Fix bounds issue in goto_set_num_threads

View File

@ -568,7 +568,7 @@ void goto_set_num_threads(int num_threads)
blas_server_avail = 1;
}
for(i = blas_num_threads - 1; i < num_threads - 1; i++){
for(i = blas_num_threads; i < num_threads - 1; i++){
blas_threads[i] = CreateThread(NULL, 0,
blas_thread_server, (void *)i,