1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

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 <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-12-28 10:16:53 +01:00
parent 30c14fdc95
commit 5b08494312

View file

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