From: Marco Costalba Date: Tue, 28 Dec 2010 09:16:53 +0000 (+0100) Subject: Fix broken last patch series X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=5b0849431221b09499b9f55c901da249ffdcd566;p=fairystockfish.git 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 --- diff --git a/src/search.cpp b/src/search.cpp index fdad3e5..6678b32 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);