Fix issue in MakeRelocateNeighborsOperator

This commit is contained in:
furnon
2017-06-08 12:26:05 +00:00
parent ce771a90aa
commit 2c61433fc3

View File

@@ -53,7 +53,7 @@ bool MakeRelocateNeighborsOperator::MoveChainAndRepair(int64 before_chain,
if (current == last) { // chain was just before destination
current = before_chain;
}
while (last >= 0 && !IsPathStart(current)) {
while (last >= 0 && !IsPathStart(current) && current != last) {
last = Reposition(current, last);
current = Prev(current);
}