1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00: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:
Marco Costalba 2010-05-12 12:30:00 +01:00
parent 16d6faf479
commit 02fe05cd0d

View file

@ -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)
{