BUG/MEDIUM: threads: properly fix nbthreads == MAX_THREADS

While moving Olivier's patch for nbthread==MAX_THREADS in commit
3e12304 ("BUG/MINOR: threads: Handle nbthread == MAX_THREADS.") to
hathreads.c, I missed one place resulting in the computed thread mask
being used as the thread count, which is worse than the initial bug.
Let's fix it properly this time.

This fix must be backported to 1.8 just like the other one.
1 file changed