Fix use of uninitialized variable
authorMarco Costalba <mcostalba@gmail.com>
Fri, 12 Aug 2011 09:42:08 +0000 (11:42 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 12 Aug 2011 10:56:11 +0000 (11:56 +0100)
commit13524bea9b7a64dd2881880b2272f3ccd494c262
tree6b5cd39cf1e572f7e421a58385cbec3035e75049
parent500c7f44ab46ca6303c465586a17fa63b8488cb4
Fix use of uninitialized variable

When initializing endgames map we build a faked FEN string
in mat_key() to get the position hash's key.

This fen string lacks full move numbers, so when parsing the
fen in Position::from_fen() we leave startPosPly un-initialized.

Spotted by Valgrind (this is a kind of bug that is almost impossible
for humans to find).

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/endgame.cpp