summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
74fd572)
Introduced in the patch "movegen: prefer (*mlist++) to mlist[n++]"
This was nasty because due to a mismerge the repo in one PC had the bug,
but the testing one did not, so I had non reproducible results according
to which machine I used for testing.
This hopefully closes a more then one week regression that made me go crazy!
It was found by accident comparing, for other reasons, the sources of the
two PC's.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
// Pawn moves. Because a blocking evasion can never be a capture, we
// only generate pawn pushes.
if (us == WHITE)
// Pawn moves. Because a blocking evasion can never be a capture, we
// only generate pawn pushes.
if (us == WHITE)
- generate_pawn_blocking_evasions<WHITE>(pos, not_pinned, blockSquares, mlist);
+ mlist = generate_pawn_blocking_evasions<WHITE>(pos, not_pinned, blockSquares, mlist);
- generate_pawn_blocking_evasions<BLACK>(pos, not_pinned, blockSquares, mlist);
+ mlist = generate_pawn_blocking_evasions<BLACK>(pos, not_pinned, blockSquares, mlist);
// Pieces moves
b1 = pos.knights(us) & not_pinned;
if (b1)
// Pieces moves
b1 = pos.knights(us) & not_pinned;
if (b1)
- generate_piece_blocking_evasions<KNIGHT>(pos, b1, blockSquares, mlist);
+ mlist = generate_piece_blocking_evasions<KNIGHT>(pos, b1, blockSquares, mlist);
b1 = pos.bishops(us) & not_pinned;
if (b1)
b1 = pos.bishops(us) & not_pinned;
if (b1)
- generate_piece_blocking_evasions<BISHOP>(pos, b1, blockSquares, mlist);
+ mlist = generate_piece_blocking_evasions<BISHOP>(pos, b1, blockSquares, mlist);
b1 = pos.rooks(us) & not_pinned;
if (b1)
b1 = pos.rooks(us) & not_pinned;
if (b1)
- generate_piece_blocking_evasions<ROOK>(pos, b1, blockSquares, mlist);
+ mlist = generate_piece_blocking_evasions<ROOK>(pos, b1, blockSquares, mlist);
b1 = pos.queens(us) & not_pinned;
if (b1)
b1 = pos.queens(us) & not_pinned;
if (b1)
- generate_piece_blocking_evasions<QUEEN>(pos, b1, blockSquares, mlist);
+ mlist = generate_piece_blocking_evasions<QUEEN>(pos, b1, blockSquares, mlist);
}
// Finally, the ugly special case of en passant captures. An en passant
}
// Finally, the ugly special case of en passant captures. An en passant