From 5b0849431221b09499b9f55c901da249ffdcd566 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 28 Dec 2010 10:16:53 +0100 Subject: [PATCH] Fix broken last patch series When a reference breaks things ! Here we take a reference (that is a pointer) to an entry in a vector that changes below us --> BOOM ! References are essential but should be considered with care in C++ because could lead to nasty surprises. Restored functionality. 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 fdad3e51..6678b32d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -2744,7 +2744,7 @@ split_point_start: // At split points actual search starts from here for (i = 1; i <= n; i++) { - const RootMove& rm = this->at(i); + const RootMove rm = this->at(i); for (j = i; j > 0 && this->at(j - 1) < rm; j--) (*this)[j] = this->at(j - 1);