From 02fe05cd0db6491c82e1d3c0522fe824432113e5 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 12 May 2010 12:30:00 +0100 Subject: [PATCH] Fix a possible out of range access in previous patch No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 4a2acb62..ed15902d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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) { -- 2.39.2