]> git.sesse.net Git - stockfish/commitdiff
Fix pieceList initialization in Position::clear()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 10 Oct 2009 08:48:02 +0000 (09:48 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 10 Oct 2009 08:49:41 +0000 (09:49 +0100)
We want piece list to be terminated with SQ_NONE.

This happens with all the pieces but the pawns that
being 8 make the inner loop exit just before writing
the SQ_NONE value at the tail of the list.

This bug was hidden because currently we don't use
piece list to scan pawns, but this will change in the
future and in any case an initialization should be done
correctly for the whole array to avoid subtle bugs in
the future.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found