Small code reformat in TranspositionTable::extract_pv()

In particular don't use an array of StateInfo, this
avoids a possible overflow and is in any case redundant.

Also pass as argument the pv[] array size to avoid a second
possible overflow on this one.

Fix suggested by Joona.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba
2009-10-05 12:00:35 +01:00
parent 32dfaa56b0
commit 60bc30275d
3 changed files with 18 additions and 19 deletions
+1 -1
View File
@@ -947,7 +947,7 @@ namespace {
// Update PV
rml.set_move_score(i, value);
update_pv(ss, 0);
TT.extract_pv(pos, ss[0].pv);
TT.extract_pv(pos, ss[0].pv, PLY_MAX);
rml.set_move_pv(i, ss[0].pv);
if (MultiPV == 1)