mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 02:57:11 +08:00
Fix a possible out of range access in previous patch
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -2409,7 +2409,7 @@ namespace {
|
||||
// If this thread is the master of a split point and all slaves have
|
||||
// finished their work at this split point, return from the idle loop.
|
||||
int i = 0;
|
||||
for ( ; sp && !sp->slaves[i] && i < ActiveThreads; i++) {}
|
||||
for ( ; sp && i < ActiveThreads && !sp->slaves[i]; i++) {}
|
||||
|
||||
if (i == ActiveThreads)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user